aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2012-08-09 22:22:47 -0400
committerDavid S. Miller <davem@davemloft.net>2012-08-10 17:08:57 -0400
commitb5ec8eeac46a99004c26791f70b15d001e970acf (patch)
tree8609d6c3e5e9504e6f084828b9b0f8a9084652e3 /include
parent63d02d157ec4124990258d66517b6c11fd6df0cf (diff)
ipv4: fix ip_send_skb()
ip_send_skb() can send orphaned skb, so we must pass the net pointer to avoid possible NULL dereference in error path. Bug added by commit 3a7c384ffd57 (ipv4: tcp: unicast_sock should not land outside of TCP stack) Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/ip.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/ip.h b/include/net/ip.h
index bd5e444a19ce..5a5d84d3d2c6 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -120,7 +120,7 @@ extern struct sk_buff *__ip_make_skb(struct sock *sk,
120 struct flowi4 *fl4, 120 struct flowi4 *fl4,
121 struct sk_buff_head *queue, 121 struct sk_buff_head *queue,
122 struct inet_cork *cork); 122 struct inet_cork *cork);
123extern int ip_send_skb(struct sk_buff *skb); 123extern int ip_send_skb(struct net *net, struct sk_buff *skb);
124extern int ip_push_pending_frames(struct sock *sk, struct flowi4 *fl4); 124extern int ip_push_pending_frames(struct sock *sk, struct flowi4 *fl4);
125extern void ip_flush_pending_frames(struct sock *sk); 125extern void ip_flush_pending_frames(struct sock *sk);
126extern struct sk_buff *ip_make_skb(struct sock *sk, 126extern struct sk_buff *ip_make_skb(struct sock *sk,