]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[PATCH] XFRM: Use output device disable_xfrm for forwarded packets
authorPatrick McHardy <kaber@trash.net>
Tue, 5 Dec 2006 04:01:31 +0000 (20:01 -0800)
committerChris Wright <chrisw@sous-sol.org>
Mon, 11 Dec 2006 19:32:39 +0000 (11:32 -0800)
Currently the behaviour of disable_xfrm is inconsistent between
locally generated and forwarded packets. For locally generated
packets disable_xfrm disables the policy lookup if it is set on
the output device, for forwarded traffic however it looks at the
input device. This makes it impossible to disable xfrm on all
devices but a dummy device and use normal routing to direct
traffic to that device.

Always use the output device when checking disable_xfrm.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
net/ipv4/route.c

index 925ee4dfc32c15039e68ddc47274239833f9cab9..00073a041b7157982deee5a9905c304d885f01e5 100644 (file)
@@ -1784,7 +1784,7 @@ static inline int __mkroute_input(struct sk_buff *skb,
 #endif
        if (in_dev->cnf.no_policy)
                rth->u.dst.flags |= DST_NOPOLICY;
-       if (in_dev->cnf.no_xfrm)
+       if (out_dev->cnf.no_xfrm)
                rth->u.dst.flags |= DST_NOXFRM;
        rth->fl.fl4_dst = daddr;
        rth->rt_dst     = daddr;