]> git.baikalelectronics.ru Git - kernel.git/commit
xfrm: Generate blackhole routes only from route lookup functions
authorSteffen Klassert <steffen.klassert@secunet.com>
Tue, 16 Sep 2014 08:08:40 +0000 (10:08 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Tue, 16 Sep 2014 08:08:40 +0000 (10:08 +0200)
commitb3ad3e083eb911038c5f8926a053f4c9bd4b2330
tree014f5e6b027f1446b5bda041382b30262868bf86
parent04bb4787398e5e14b605c458908a28944b1bea4e
xfrm: Generate blackhole routes only from route lookup functions

Currently we genarate a blackhole route route whenever we have
matching policies but can not resolve the states. Here we assume
that dst_output() is called to kill the balckholed packets.
Unfortunately this assumption is not true in all cases, so
it is possible that these packets leave the system unwanted.

We fix this by generating blackhole routes only from the
route lookup functions, here we can guarantee a call to
dst_output() afterwards.

Fixes: 530fcaa7706 ("xfrm: Handle blackhole route creation via afinfo.")
Reported-by: Konstantinos Kolelis <k.kolelis@sirrix.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
include/net/dst.h
net/ipv4/route.c
net/ipv6/ip6_output.c
net/xfrm/xfrm_policy.c