Skip to content

Commit 8602a62

Browse files
roopa-prabhudavem330
authored andcommitted
ipv4: redirect dst output to lwtunnel output
For input routes with tunnel encap state this patch redirects dst output functions to lwtunnel_output which later resolves to the corresponding lwtunnel output function. This has been tested to work with mpls ip tunnels. Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent ffce419 commit 8602a62

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/ipv4/route.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1633,6 +1633,8 @@ static int __mkroute_input(struct sk_buff *skb,
16331633
rth->dst.output = ip_output;
16341634

16351635
rt_set_nexthop(rth, daddr, res, fnhe, res->fi, res->type, itag);
1636+
if (lwtunnel_output_redirect(rth->rt_lwtstate))
1637+
rth->dst.output = lwtunnel_output;
16361638
skb_dst_set(skb, &rth->dst);
16371639
out:
16381640
err = 0;

0 commit comments

Comments
 (0)