diff options
author | Roopa Prabhu <roopa@cumulusnetworks.com> | 2015-07-21 10:43:50 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-07-21 10:39:04 -0700 |
commit | 8602a625024737602630fe0dee423b3096d31524 (patch) | |
tree | bec1f97968e85a795f293ae7ae062c870e007f50 | |
parent | ffce41962ef64b8e685e5b621caf24bf381addd9 (diff) | |
download | linux-8602a625024737602630fe0dee423b3096d31524.tar.bz2 |
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>
-rw-r--r-- | net/ipv4/route.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 226570ba1ced..cd3157c464e6 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -1633,6 +1633,8 @@ static int __mkroute_input(struct sk_buff *skb, rth->dst.output = ip_output; rt_set_nexthop(rth, daddr, res, fnhe, res->fi, res->type, itag); + if (lwtunnel_output_redirect(rth->rt_lwtstate)) + rth->dst.output = lwtunnel_output; skb_dst_set(skb, &rth->dst); out: err = 0; |