diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-03-19 18:33:04 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:24:41 -0400 |
commit | 98e399f82ab3a6d863d1d4a7ea48925cc91c830e (patch) | |
tree | 5f84043aeec1ec27c2e8e6cc25b5d2e6c3d07343 /net/ipv6/ndisc.c | |
parent | 31713c333ddbb66d694829082620b69b71c4b09a (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/ipv6/ndisc.c')
-rw-r--r-- | net/ipv6/ndisc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 053147a0027e..a3e3d9e2f44b 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -828,7 +828,8 @@ static void ndisc_recv_ns(struct sk_buff *skb) | |||
828 | if (ifp->flags & (IFA_F_TENTATIVE|IFA_F_OPTIMISTIC)) { | 828 | if (ifp->flags & (IFA_F_TENTATIVE|IFA_F_OPTIMISTIC)) { |
829 | if (dad) { | 829 | if (dad) { |
830 | if (dev->type == ARPHRD_IEEE802_TR) { | 830 | if (dev->type == ARPHRD_IEEE802_TR) { |
831 | unsigned char *sadr = skb->mac.raw; | 831 | const unsigned char *sadr; |
832 | sadr = skb_mac_header(skb); | ||
832 | if (((sadr[8] ^ dev->dev_addr[0]) & 0x7f) == 0 && | 833 | if (((sadr[8] ^ dev->dev_addr[0]) & 0x7f) == 0 && |
833 | sadr[9] == dev->dev_addr[1] && | 834 | sadr[9] == dev->dev_addr[1] && |
834 | sadr[10] == dev->dev_addr[2] && | 835 | sadr[10] == dev->dev_addr[2] && |