aboutsummaryrefslogtreecommitdiffstats
path: root/net/ax25/af_ax25.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-03-19 18:33:04 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:24:41 -0400
commit98e399f82ab3a6d863d1d4a7ea48925cc91c830e (patch)
tree5f84043aeec1ec27c2e8e6cc25b5d2e6c3d07343 /net/ax25/af_ax25.c
parent31713c333ddbb66d694829082620b69b71c4b09a (diff)
[SK_BUFF]: Introduce skb_mac_header()
For the places where we need a pointer to the mac header, it is still legal to touch skb->mac.raw directly if just adding to, subtracting from or setting it to another layer header. This one also converts some more cases to skb_reset_mac_header() that my regex missed as it had no spaces before nor after '=', ugh. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ax25/af_ax25.c')
-rw-r--r--net/ax25/af_ax25.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
index 62605dc5a2c8..c89e4f6f9025 100644
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -1645,9 +1645,10 @@ static int ax25_recvmsg(struct kiocb *iocb, struct socket *sock,
1645 struct sockaddr_ax25 *sax = (struct sockaddr_ax25 *)msg->msg_name; 1645 struct sockaddr_ax25 *sax = (struct sockaddr_ax25 *)msg->msg_name;
1646 ax25_digi digi; 1646 ax25_digi digi;
1647 ax25_address src; 1647 ax25_address src;
1648 const unsigned char *mac = skb_mac_header(skb);
1648 1649
1649 ax25_addr_parse(skb->mac.raw+1, skb->data-skb->mac.raw-1, &src, NULL, &digi, NULL, NULL); 1650 ax25_addr_parse(mac + 1, skb->data - mac - 1, &src, NULL,
1650 1651 &digi, NULL, NULL);
1651 sax->sax25_family = AF_AX25; 1652 sax->sax25_family = AF_AX25;
1652 /* We set this correctly, even though we may not let the 1653 /* We set this correctly, even though we may not let the
1653 application know the digi calls further down (because it 1654 application know the digi calls further down (because it