xfrm: use gre key as flow upper protocol info
[pandora-kernel.git] / net / ipv4 / ip_gre.c
index cab2057..aace653 100644 (file)
@@ -779,9 +779,9 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev
                                        .tos = RT_TOS(tos)
                                }
                        },
-                       .proto = IPPROTO_GRE
-               }
-;
+                       .proto = IPPROTO_GRE,
+                       .fl_gre_key = tunnel->parms.o_key
+               };
                if (ip_route_output_key(dev_net(dev), &rt, &fl)) {
                        dev->stats.tx_carrier_errors++;
                        goto tx_error;
@@ -958,7 +958,8 @@ static int ipgre_tunnel_bind_dev(struct net_device *dev)
                                        .tos = RT_TOS(iph->tos)
                                }
                        },
-                       .proto = IPPROTO_GRE
+                       .proto = IPPROTO_GRE,
+                       .fl_gre_key = tunnel->parms.o_key
                };
                struct rtable *rt;
 
@@ -1223,7 +1224,8 @@ static int ipgre_open(struct net_device *dev)
                                        .tos = RT_TOS(t->parms.iph.tos)
                                }
                        },
-                       .proto = IPPROTO_GRE
+                       .proto = IPPROTO_GRE,
+                       .fl_gre_key = t->parms.o_key
                };
                struct rtable *rt;