diff options
author | Eric Dumazet <edumazet@google.com> | 2014-04-15 12:58:34 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-04-15 12:58:34 -0400 |
commit | b0270e91014dabfceaf37f5b40ad51bbf21a1302 (patch) | |
tree | 6bebc58cf422a4493d306a1a6fd658d0f02a411e /net/dccp | |
parent | 1dd333f470b4e1767c9c0a14b05b5104e56b2930 (diff) | |
download | linux-b0270e91014dabfceaf37f5b40ad51bbf21a1302.tar.bz2 |
ipv4: add a sock pointer to ip_queue_xmit()
ip_queue_xmit() assumes the skb it has to transmit is attached to an
inet socket. Commit 31c70d5956fc ("l2tp: keep original skb ownership")
changed l2tp to not change skb ownership and thus broke this assumption.
One fix is to add a new 'struct sock *sk' parameter to ip_queue_xmit(),
so that we do not assume skb->sk points to the socket used by l2tp
tunnel.
Fixes: 31c70d5956fc ("l2tp: keep original skb ownership")
Reported-by: Zhan Jianyu <nasa4836@gmail.com>
Tested-by: Zhan Jianyu <nasa4836@gmail.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp')
-rw-r--r-- | net/dccp/output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dccp/output.c b/net/dccp/output.c index 8876078859da..0248e8a3460c 100644 --- a/net/dccp/output.c +++ b/net/dccp/output.c @@ -138,7 +138,7 @@ static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb) DCCP_INC_STATS(DCCP_MIB_OUTSEGS); - err = icsk->icsk_af_ops->queue_xmit(skb, &inet->cork.fl); + err = icsk->icsk_af_ops->queue_xmit(sk, skb, &inet->cork.fl); return net_xmit_eval(err); } return -ENOBUFS; |