diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-03-10 16:40:59 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:24:48 -0400 |
commit | 7e28ecc282574a7d72ace365fc9bc86e27ba880f (patch) | |
tree | 6321d16c591694d6405b723f7bea80855b8040ce /net/appletalk | |
parent | e2d1bca7e6134671bcb19810d004a252aa6a644d (diff) |
[SK_BUFF]: Use skb_reset_network_header where the skb_pull return was being used
But only in the cases where its a newly allocated skb, i.e. one where skb->tail
is equal to skb->data, or just after skb_reserve, where this requirement is
maintained.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/appletalk')
-rw-r--r-- | net/appletalk/aarp.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/net/appletalk/aarp.c b/net/appletalk/aarp.c index d4e5ba22e246..de495c57aa90 100644 --- a/net/appletalk/aarp.c +++ b/net/appletalk/aarp.c | |||
@@ -118,7 +118,9 @@ static void __aarp_send_query(struct aarp_entry *a) | |||
118 | 118 | ||
119 | /* Set up the buffer */ | 119 | /* Set up the buffer */ |
120 | skb_reserve(skb, dev->hard_header_len + aarp_dl->header_length); | 120 | skb_reserve(skb, dev->hard_header_len + aarp_dl->header_length); |
121 | skb->nh.raw = skb->h.raw = skb_put(skb, sizeof(*eah)); | 121 | skb_reset_network_header(skb); |
122 | skb->h.raw = skb->data; | ||
123 | skb_put(skb, sizeof(*eah)); | ||
122 | skb->protocol = htons(ETH_P_ATALK); | 124 | skb->protocol = htons(ETH_P_ATALK); |
123 | skb->dev = dev; | 125 | skb->dev = dev; |
124 | eah = aarp_hdr(skb); | 126 | eah = aarp_hdr(skb); |
@@ -163,7 +165,9 @@ static void aarp_send_reply(struct net_device *dev, struct atalk_addr *us, | |||
163 | 165 | ||
164 | /* Set up the buffer */ | 166 | /* Set up the buffer */ |
165 | skb_reserve(skb, dev->hard_header_len + aarp_dl->header_length); | 167 | skb_reserve(skb, dev->hard_header_len + aarp_dl->header_length); |
166 | skb->nh.raw = skb->h.raw = skb_put(skb, sizeof(*eah)); | 168 | skb_reset_network_header(skb); |
169 | skb->h.raw = skb->data; | ||
170 | skb_put(skb, sizeof(*eah)); | ||
167 | skb->protocol = htons(ETH_P_ATALK); | 171 | skb->protocol = htons(ETH_P_ATALK); |
168 | skb->dev = dev; | 172 | skb->dev = dev; |
169 | eah = aarp_hdr(skb); | 173 | eah = aarp_hdr(skb); |
@@ -212,7 +216,9 @@ static void aarp_send_probe(struct net_device *dev, struct atalk_addr *us) | |||
212 | 216 | ||
213 | /* Set up the buffer */ | 217 | /* Set up the buffer */ |
214 | skb_reserve(skb, dev->hard_header_len + aarp_dl->header_length); | 218 | skb_reserve(skb, dev->hard_header_len + aarp_dl->header_length); |
215 | skb->nh.raw = skb->h.raw = skb_put(skb, sizeof(*eah)); | 219 | skb_reset_network_header(skb); |
220 | skb->h.raw = skb->data; | ||
221 | skb_put(skb, sizeof(*eah)); | ||
216 | skb->protocol = htons(ETH_P_ATALK); | 222 | skb->protocol = htons(ETH_P_ATALK); |
217 | skb->dev = dev; | 223 | skb->dev = dev; |
218 | eah = aarp_hdr(skb); | 224 | eah = aarp_hdr(skb); |