aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_sockglue.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-03-10 17:15:25 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:24:51 -0400
commit2ca9e6f2c2a4117d21947e911ae1f5e5306b0df0 (patch)
treef303929b784c744e52eae5a2e42b6190ca123f71 /net/ipv4/ip_sockglue.c
parent31c7711b509d470ab1e175e7bb98ea66a82aa916 (diff)
[SK_BUFF]: Some more skb_put cases converted to skb_reset_network_header
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_sockglue.c')
-rw-r--r--net/ipv4/ip_sockglue.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
index c5e41644c80d..f8ab654b6a35 100644
--- a/net/ipv4/ip_sockglue.c
+++ b/net/ipv4/ip_sockglue.c
@@ -296,8 +296,9 @@ void ip_local_error(struct sock *sk, int err, __be32 daddr, __be16 port, u32 inf
296 if (!skb) 296 if (!skb)
297 return; 297 return;
298 298
299 iph = (struct iphdr*)skb_put(skb, sizeof(struct iphdr)); 299 skb_put(skb, sizeof(struct iphdr));
300 skb->nh.iph = iph; 300 skb_reset_network_header(skb);
301 iph = skb->nh.iph;
301 iph->daddr = daddr; 302 iph->daddr = daddr;
302 303
303 serr = SKB_EXT_ERR(skb); 304 serr = SKB_EXT_ERR(skb);