]> git.baikalelectronics.ru Git - kernel.git/commit
ipvs: Keep skb->sk when allocating headroom on tunnel xmit
authorCalvin Owens <calvinowens@fb.com>
Wed, 5 Nov 2014 00:37:40 +0000 (16:37 -0800)
committerSimon Horman <horms@verge.net.au>
Wed, 12 Nov 2014 02:03:04 +0000 (11:03 +0900)
commita26c31536d9f9cf9958c96903af030d7e47d68cd
tree61c9758c73655b8ee3f23a7b40c0594493d31d2c
parent8f8d9c1af19ab52762efbe10cfc342355ee6a8a1
ipvs: Keep skb->sk when allocating headroom on tunnel xmit

ip_vs_prepare_tunneled_skb() ignores ->sk when allocating a new
skb, either unconditionally setting ->sk to NULL or allowing
the uninitialized ->sk from a newly allocated skb to leak through
to the caller.

This patch properly copies ->sk and increments its reference count.

Signed-off-by: Calvin Owens <calvinowens@fb.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
net/netfilter/ipvs/ip_vs_xmit.c