]> git.hungrycats.org Git - linux/commitdiff
[AX25]: Missing spin_unlock() and recvmsg reported dst instead of src.
authorJeroen Vreeken <pe1rxq@amsat.org>
Wed, 31 Dec 2003 02:37:20 +0000 (18:37 -0800)
committerDavid S. Miller <davem@nuts.ninka.net>
Wed, 31 Dec 2003 02:37:20 +0000 (18:37 -0800)
net/ax25/af_ax25.c

index 98dab588be1c325159660e3ffaeddd50fce3283a..4fb1519b930fe86a16fe300f99441be911bac4a3 100644 (file)
@@ -247,6 +247,7 @@ void ax25_send_to_raw(ax25_address *addr, struct sk_buff *skb, int proto)
                                kfree_skb(copy);
                }
        }
+       spin_unlock_bh(&ax25_list_lock);
 }
 
 /*
@@ -1618,16 +1619,16 @@ static int ax25_recvmsg(struct kiocb *iocb, struct socket *sock,
        if (msg->msg_namelen != 0) {
                struct sockaddr_ax25 *sax = (struct sockaddr_ax25 *)msg->msg_name;
                ax25_digi digi;
-               ax25_address dest;
+               ax25_address src;
 
-               ax25_addr_parse(skb->mac.raw+1, skb->data-skb->mac.raw-1, NULL, &dest, &digi, NULL, NULL);
+               ax25_addr_parse(skb->mac.raw+1, skb->data-skb->mac.raw-1, &src, NULL, &digi, NULL, NULL);
 
                sax->sax25_family = AF_AX25;
                /* We set this correctly, even though we may not let the
                   application know the digi calls further down (because it
                   did NOT ask to know them).  This could get political... **/
                sax->sax25_ndigis = digi.ndigi;
-               sax->sax25_call   = dest;
+               sax->sax25_call   = src;
 
                if (sax->sax25_ndigis != 0) {
                        int ct;