Skip to content

Commit 6673a9f

Browse files
NicolasDichteldavem330
authored andcommitted
ipv6: use lwtunnel_output6() only if flag redirect is set
This function make sense only when LWTUNNEL_STATE_OUTPUT_REDIRECT is set. The check is already done in IPv4. CC: Thomas Graf <tgraf@suug.ch> CC: Roopa Prabhu <roopa@cumulusnetworks.com> Fixes: 74a0f2f ("ipv6: rt6_info output redirect to tunnel output") Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Acked-by: Thomas Graf <tgraf@suug.ch> Acked-by: Roopa Prabhu <roopa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 9267135 commit 6673a9f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/ipv6/route.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1780,7 +1780,8 @@ int ip6_route_add(struct fib6_config *cfg)
17801780
goto out;
17811781
lwtunnel_state_get(lwtstate);
17821782
rt->rt6i_lwtstate = lwtstate;
1783-
rt->dst.output = lwtunnel_output6;
1783+
if (lwtunnel_output_redirect(rt->rt6i_lwtstate))
1784+
rt->dst.output = lwtunnel_output6;
17841785
}
17851786

17861787
ipv6_addr_prefix(&rt->rt6i_dst.addr, &cfg->fc_dst, cfg->fc_dst_len);

0 commit comments

Comments
 (0)