Commit 2ca9e6f2 authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo Committed by David S. Miller

[SK_BUFF]: Some more skb_put cases converted to skb_reset_network_header

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 31c7711b
...@@ -1126,7 +1126,8 @@ ssize_t ip_append_page(struct sock *sk, struct page *page, ...@@ -1126,7 +1126,8 @@ ssize_t ip_append_page(struct sock *sk, struct page *page,
* Find where to start putting bytes. * Find where to start putting bytes.
*/ */
data = skb_put(skb, fragheaderlen + fraggap); data = skb_put(skb, fragheaderlen + fraggap);
skb->nh.iph = iph = (struct iphdr *)data; skb_reset_network_header(skb);
iph = skb->nh.iph;
data += fragheaderlen; data += fragheaderlen;
skb->h.raw = data; skb->h.raw = data;
......
...@@ -296,8 +296,9 @@ void ip_local_error(struct sock *sk, int err, __be32 daddr, __be16 port, u32 inf ...@@ -296,8 +296,9 @@ void ip_local_error(struct sock *sk, int err, __be32 daddr, __be16 port, u32 inf
if (!skb) if (!skb)
return; return;
iph = (struct iphdr*)skb_put(skb, sizeof(struct iphdr)); skb_put(skb, sizeof(struct iphdr));
skb->nh.iph = iph; skb_reset_network_header(skb);
iph = skb->nh.iph;
iph->daddr = daddr; iph->daddr = daddr;
serr = SKB_EXT_ERR(skb); serr = SKB_EXT_ERR(skb);
......
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