]> git.karo-electronics.de Git - linux-beck.git/commit
[IPV4] IPSEC: Omit redirect for tunnelled packet.
authorMasahide NAKAMURA <nakam@linux-ipv6.org>
Sat, 25 Aug 2007 06:33:01 +0000 (23:33 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:48:33 +0000 (16:48 -0700)
commit3b26a9a655ee73a87071a9f6a1fdd5311e31d7c9
treec59ebe35c750e21ed7a3b10707fc4d9da1ca41c3
parent1e5dc146173251e7baad9a1f7586d5a009b6d9f9
[IPV4] IPSEC: Omit redirect for tunnelled packet.

IPv4 IPsec tunnel gateway incorrectly sends redirect to
sender if it is onlink host when network device the IPsec tunnelled
packet is arrived is the same as the one the decapsulated packet
is sent.

With this patch, it omits to send the redirect when the forwarding
skbuff carries secpath, since such skbuff should be assumed as
a decapsulated packet from IPsec tunnel by own.

Request for comments:
Alternatively we'd have another way to change net/ipv4/route.c
(__mkroute_input) to use RTCF_DOREDIRECT flag unless skbuff
has no secpath. It is better than this patch at performance
point of view because IPv4 redirect judgement is done at
routing slow-path. However, it should be taken care of resource
changes between SAD(XFRM states) and routing table. In other words,
When IPv4 SAD is changed does the related routing entry go to its
slow-path? If not, it is reasonable to apply this patch.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_forward.c