struct rt6_info *rt = (struct rt6_info *)skb_dst(skb);
struct lwtunnel_state *lwtstate = NULL;
- if (rt)
+ if (rt) {
lwtstate = rt->rt6i_lwtstate;
+ skb->dev = rt->dst.dev;
+ }
+
+ skb->protocol = htons(ETH_P_IPV6);
return __lwtunnel_output(sk, skb, lwtstate);
}
struct rtable *rt = (struct rtable *)skb_dst(skb);
struct lwtunnel_state *lwtstate = NULL;
- if (rt)
+ if (rt) {
lwtstate = rt->rt_lwtstate;
+ skb->dev = rt->dst.dev;
+ }
+
+ skb->protocol = htons(ETH_P_IP);
return __lwtunnel_output(sk, skb, lwtstate);
}