lwt: Add support to redirect dst.input
[deliverable/linux.git] / net / ipv4 / route.c
index 2c89d294b669803323d2b48f32aeb7726d00b235..2403e85107f028fcff8bdcfd9bc5f72fcfb6bf69 100644 (file)
@@ -1631,8 +1631,14 @@ 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))
+       if (lwtunnel_output_redirect(rth->rt_lwtstate)) {
+               rth->rt_lwtstate->orig_output = rth->dst.output;
                rth->dst.output = lwtunnel_output;
+       }
+       if (lwtunnel_input_redirect(rth->rt_lwtstate)) {
+               rth->rt_lwtstate->orig_input = rth->dst.input;
+               rth->dst.input = lwtunnel_input;
+       }
        skb_dst_set(skb, &rth->dst);
 out:
        err = 0;
This page took 0.025667 seconds and 5 git commands to generate.