aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ila/ila_lwt.c
diff options
context:
space:
mode:
authorTom Herbert <tom@herbertland.com>2016-06-07 16:09:44 -0700
committerDavid S. Miller <davem@davemloft.net>2016-06-08 00:40:34 -0700
commit707a2ca4870fcf6b5480cdfad563b940f56f0844 (patch)
tree1f3246877173faadbb4589af7995d2224acab189 /net/ipv6/ila/ila_lwt.c
parenttcp: accept RST if SEQ matches right edge of right-most SACK block (diff)
downloadlinux-dev-707a2ca4870fcf6b5480cdfad563b940f56f0844.tar.xz
linux-dev-707a2ca4870fcf6b5480cdfad563b940f56f0844.zip
ila: Perform only one translation in forwarding path
When setting up ILA in a router we noticed that the the encapsulation is invoked twice: once in the route input path and again upon route output. To resolve this we add a flag set_csum_neutral for the ila_update_ipv6_locator. If this flag is set and the checksum neutral bit is also set we assume that checksum-neutral translation has already been performed and take no further action. The flag is set only in ila_output path. The flag is not set for ila_input and ila_xlat. Tested: Used 3 netns to set to emulate a router and two hosts. The router translates SIR addresses between the two destinations in other two netns. Verified ping and netperf are functional. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ila/ila_lwt.c')
-rw-r--r--net/ipv6/ila/ila_lwt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/ila/ila_lwt.c b/net/ipv6/ila/ila_lwt.c
index 1dfb64166d7d..c8314c6b6154 100644
--- a/net/ipv6/ila/ila_lwt.c
+++ b/net/ipv6/ila/ila_lwt.c
@@ -26,7 +26,7 @@ static int ila_output(struct net *net, struct sock *sk, struct sk_buff *skb)
if (skb->protocol != htons(ETH_P_IPV6))
goto drop;
- ila_update_ipv6_locator(skb, ila_params_lwtunnel(dst->lwtstate));
+ ila_update_ipv6_locator(skb, ila_params_lwtunnel(dst->lwtstate), true);
return dst->lwtstate->orig_output(net, sk, skb);
@@ -42,7 +42,7 @@ static int ila_input(struct sk_buff *skb)
if (skb->protocol != htons(ETH_P_IPV6))
goto drop;
- ila_update_ipv6_locator(skb, ila_params_lwtunnel(dst->lwtstate));
+ ila_update_ipv6_locator(skb, ila_params_lwtunnel(dst->lwtstate), false);
return dst->lwtstate->orig_input(skb);