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. Commit31c70d5956
("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:31c70d5956
("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>
This commit is contained in:

committed by
David S. Miller

parent
1dd333f470
commit
b0270e9101
@@ -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;
|
||||
|
Reference in New Issue
Block a user