]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: add a sock pointer to ip_queue_xmit()
authorEric Dumazet <edumazet@google.com>
Tue, 15 Apr 2014 16:58:34 +0000 (12:58 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Apr 2014 16:58:34 +0000 (12:58 -0400)
commit72e054a42569347c416056aa3b9685f8d2a916a4
tree6bebc58cf422a4493d306a1a6fd658d0f02a411e
parent34feef49f948b54ba56ad3c4f3b76985cf2e5903
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 675904a9cbf2 ("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: 675904a9cbf2 ("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>
include/net/inet6_connection_sock.h
include/net/inet_connection_sock.h
include/net/ip.h
net/dccp/output.c
net/ipv4/ip_output.c
net/ipv4/tcp_output.c
net/ipv6/inet6_connection_sock.c
net/l2tp/l2tp_core.c
net/l2tp/l2tp_ip.c
net/sctp/protocol.c