]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: ip_tunnel: use net namespace from rtable not socket
authorHannes Frederic Sowa <hannes@stressinduktion.org>
Wed, 8 Apr 2015 15:01:22 +0000 (17:01 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Apr 2015 16:09:42 +0000 (12:09 -0400)
commitf87c711137137434f55fef17e236b8c344b4536a
tree3881c4b8379091fc59e20309e22a0661d2b8b807
parentfd79ecc690655281122c0c5ecb844144f48d5697
ipv4: ip_tunnel: use net namespace from rtable not socket

The socket parameter might legally be NULL, thus sock_net is sometimes
causing a NULL pointer dereference. Using net_device pointer in dst_entry
is more reliable.

Fixes: 5fcce0908a62062 ("ipv4: hash net ptr into fragmentation bucket selection")
Reported-by: Rick Jones <rick.jones2@hp.com>
Cc: Rick Jones <rick.jones2@hp.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_tunnel_core.c