netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RFC: consistent disable_xfrm behaviour
@ 2006-12-04 14:59 Patrick McHardy
  2006-12-04 15:05 ` James Morris
  0 siblings, 1 reply; 7+ messages in thread
From: Patrick McHardy @ 2006-12-04 14:59 UTC (permalink / raw)
  To: Linux Netdev List

[-- Attachment #1: Type: text/plain, Size: 705 bytes --]

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.

The Documentation is not exactly clear about whether the input
or output device is meant, but the way I read it talks about
the output device as well (since encryption is only done at
output):

disable_xfrm - BOOLEAN

        Disable IPSEC encryption on this interface, whatever the policy

Opinions?


[-- Attachment #2: x --]
[-- Type: text/plain, Size: 401 bytes --]

diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 9f3924c..164a7ee 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1780,7 +1780,7 @@ #ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED
 #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;

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-12-05  3:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-04 14:59 RFC: consistent disable_xfrm behaviour Patrick McHardy
2006-12-04 15:05 ` James Morris
2006-12-04 15:20   ` Patrick McHardy
2006-12-04 16:52     ` Alexey Kuznetsov
2006-12-04 17:03       ` Patrick McHardy
2006-12-04 17:20         ` Alexey Kuznetsov
2006-12-05  3:59           ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).