diff options
author | Denis V. Lunev <den@openvz.org> | 2008-01-23 01:07:34 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:11:07 -0500 |
commit | f206351a50ea86250fabea96b9af8d8f8fc02603 (patch) | |
tree | 014148d8b45db1995d98374ec3b30e635f243197 /net/ipv4/ip_gre.c | |
parent | f1b050bf7a88910f9f00c9c8989c1bf5a67dd140 (diff) |
[NETNS]: Add namespace parameter to ip_route_output_key.
Needed to propagate it down to the ip_route_output_flow.
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_gre.c')
-rw-r--r-- | net/ipv4/ip_gre.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index a74983d8c89c..63f691719353 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c | |||
@@ -480,7 +480,7 @@ out: | |||
480 | fl.fl4_dst = eiph->saddr; | 480 | fl.fl4_dst = eiph->saddr; |
481 | fl.fl4_tos = RT_TOS(eiph->tos); | 481 | fl.fl4_tos = RT_TOS(eiph->tos); |
482 | fl.proto = IPPROTO_GRE; | 482 | fl.proto = IPPROTO_GRE; |
483 | if (ip_route_output_key(&rt, &fl)) { | 483 | if (ip_route_output_key(&init_net, &rt, &fl)) { |
484 | kfree_skb(skb2); | 484 | kfree_skb(skb2); |
485 | return; | 485 | return; |
486 | } | 486 | } |
@@ -493,7 +493,7 @@ out: | |||
493 | fl.fl4_dst = eiph->daddr; | 493 | fl.fl4_dst = eiph->daddr; |
494 | fl.fl4_src = eiph->saddr; | 494 | fl.fl4_src = eiph->saddr; |
495 | fl.fl4_tos = eiph->tos; | 495 | fl.fl4_tos = eiph->tos; |
496 | if (ip_route_output_key(&rt, &fl) || | 496 | if (ip_route_output_key(&init_net, &rt, &fl) || |
497 | rt->u.dst.dev->type != ARPHRD_IPGRE) { | 497 | rt->u.dst.dev->type != ARPHRD_IPGRE) { |
498 | ip_rt_put(rt); | 498 | ip_rt_put(rt); |
499 | kfree_skb(skb2); | 499 | kfree_skb(skb2); |
@@ -748,7 +748,7 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
748 | .saddr = tiph->saddr, | 748 | .saddr = tiph->saddr, |
749 | .tos = RT_TOS(tos) } }, | 749 | .tos = RT_TOS(tos) } }, |
750 | .proto = IPPROTO_GRE }; | 750 | .proto = IPPROTO_GRE }; |
751 | if (ip_route_output_key(&rt, &fl)) { | 751 | if (ip_route_output_key(&init_net, &rt, &fl)) { |
752 | tunnel->stat.tx_carrier_errors++; | 752 | tunnel->stat.tx_carrier_errors++; |
753 | goto tx_error; | 753 | goto tx_error; |
754 | } | 754 | } |
@@ -921,7 +921,7 @@ static void ipgre_tunnel_bind_dev(struct net_device *dev) | |||
921 | .tos = RT_TOS(iph->tos) } }, | 921 | .tos = RT_TOS(iph->tos) } }, |
922 | .proto = IPPROTO_GRE }; | 922 | .proto = IPPROTO_GRE }; |
923 | struct rtable *rt; | 923 | struct rtable *rt; |
924 | if (!ip_route_output_key(&rt, &fl)) { | 924 | if (!ip_route_output_key(&init_net, &rt, &fl)) { |
925 | tdev = rt->u.dst.dev; | 925 | tdev = rt->u.dst.dev; |
926 | ip_rt_put(rt); | 926 | ip_rt_put(rt); |
927 | } | 927 | } |
@@ -1177,7 +1177,7 @@ static int ipgre_open(struct net_device *dev) | |||
1177 | .tos = RT_TOS(t->parms.iph.tos) } }, | 1177 | .tos = RT_TOS(t->parms.iph.tos) } }, |
1178 | .proto = IPPROTO_GRE }; | 1178 | .proto = IPPROTO_GRE }; |
1179 | struct rtable *rt; | 1179 | struct rtable *rt; |
1180 | if (ip_route_output_key(&rt, &fl)) | 1180 | if (ip_route_output_key(&init_net, &rt, &fl)) |
1181 | return -EADDRNOTAVAIL; | 1181 | return -EADDRNOTAVAIL; |
1182 | dev = rt->u.dst.dev; | 1182 | dev = rt->u.dst.dev; |
1183 | ip_rt_put(rt); | 1183 | ip_rt_put(rt); |