aboutsummaryrefslogtreecommitdiff
path: root/net/core
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-04-10 20:46:21 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-25 22:24:47 -0700
commite2d1bca7e6134671bcb19810d004a252aa6a644d (patch)
tree5d8ee962cd69cd886aaedff8ac253590a985dd1c /net/core
parentc1d2bbe1cd6c7bbdc6d532cefebb66c7efb789ce (diff)
[SK_BUFF]: Use skb_reset_network_header in skb_push cases
skb_push updates and returns skb->data, so we can just call skb_reset_network_header after the call to skb_push. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/netpoll.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index b4d1cdd58f1..44e030eb6e7 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -308,7 +308,9 @@ void netpoll_send_udp(struct netpoll *np, const char *msg, int len)
if (udph->check == 0)
udph->check = CSUM_MANGLED_0;
- skb->nh.iph = iph = (struct iphdr *)skb_push(skb, sizeof(*iph));
+ skb_push(skb, sizeof(*iph));
+ skb_reset_network_header(skb);
+ iph = skb->nh.iph;
/* iph->version = 4; iph->ihl = 5; */
put_unaligned(0x45, (unsigned char *)iph);