Commit cdd77850 authored by Jeroen Vreeken's avatar Jeroen Vreeken Committed by David S. Miller

[AX25]: Missing spin_unlock() and recvmsg reported dst instead of src.

parent 693519c0
...@@ -247,6 +247,7 @@ void ax25_send_to_raw(ax25_address *addr, struct sk_buff *skb, int proto) ...@@ -247,6 +247,7 @@ void ax25_send_to_raw(ax25_address *addr, struct sk_buff *skb, int proto)
kfree_skb(copy); kfree_skb(copy);
} }
} }
spin_unlock_bh(&ax25_list_lock);
} }
/* /*
...@@ -1618,16 +1619,16 @@ static int ax25_recvmsg(struct kiocb *iocb, struct socket *sock, ...@@ -1618,16 +1619,16 @@ static int ax25_recvmsg(struct kiocb *iocb, struct socket *sock,
if (msg->msg_namelen != 0) { if (msg->msg_namelen != 0) {
struct sockaddr_ax25 *sax = (struct sockaddr_ax25 *)msg->msg_name; struct sockaddr_ax25 *sax = (struct sockaddr_ax25 *)msg->msg_name;
ax25_digi digi; 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; sax->sax25_family = AF_AX25;
/* We set this correctly, even though we may not let the /* We set this correctly, even though we may not let the
application know the digi calls further down (because it application know the digi calls further down (because it
did NOT ask to know them). This could get political... **/ did NOT ask to know them). This could get political... **/
sax->sax25_ndigis = digi.ndigi; sax->sax25_ndigis = digi.ndigi;
sax->sax25_call = dest; sax->sax25_call = src;
if (sax->sax25_ndigis != 0) { if (sax->sax25_ndigis != 0) {
int ct; int ct;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment