diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-04-14 01:30:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-14 01:30:19 -0400 |
commit | f54873982c6aac9bc5c7eef62a9ce4d52b1dfc19 (patch) | |
tree | df285d76f0ada79cd588f607a276757b2a4630ec | |
parent | b76c4b27fee9c88294d3152784291fc6f6d23401 (diff) |
[NETNS][DCCPV4]: Use proper net to route the reset packet.
The dccp_v4_route_skb used in dccp_v4_ctl_send_reset, currently
works with init_net's routing tables - fix it.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/dccp/ipv4.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index cad62d8d87a0..11d0b8589aa7 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c | |||
@@ -445,7 +445,7 @@ static struct sock *dccp_v4_hnd_req(struct sock *sk, struct sk_buff *skb) | |||
445 | return sk; | 445 | return sk; |
446 | } | 446 | } |
447 | 447 | ||
448 | static struct dst_entry* dccp_v4_route_skb(struct sock *sk, | 448 | static struct dst_entry* dccp_v4_route_skb(struct net *net, struct sock *sk, |
449 | struct sk_buff *skb) | 449 | struct sk_buff *skb) |
450 | { | 450 | { |
451 | struct rtable *rt; | 451 | struct rtable *rt; |
@@ -462,7 +462,7 @@ static struct dst_entry* dccp_v4_route_skb(struct sock *sk, | |||
462 | }; | 462 | }; |
463 | 463 | ||
464 | security_skb_classify_flow(skb, &fl); | 464 | security_skb_classify_flow(skb, &fl); |
465 | if (ip_route_output_flow(&init_net, &rt, &fl, sk, 0)) { | 465 | if (ip_route_output_flow(net, &rt, &fl, sk, 0)) { |
466 | IP_INC_STATS_BH(IPSTATS_MIB_OUTNOROUTES); | 466 | IP_INC_STATS_BH(IPSTATS_MIB_OUTNOROUTES); |
467 | return NULL; | 467 | return NULL; |
468 | } | 468 | } |
@@ -515,7 +515,7 @@ static void dccp_v4_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb) | |||
515 | if (rxskb->rtable->rt_type != RTN_LOCAL) | 515 | if (rxskb->rtable->rt_type != RTN_LOCAL) |
516 | return; | 516 | return; |
517 | 517 | ||
518 | dst = dccp_v4_route_skb(ctl_sk, rxskb); | 518 | dst = dccp_v4_route_skb(net, ctl_sk, rxskb); |
519 | if (dst == NULL) | 519 | if (dst == NULL) |
520 | return; | 520 | return; |
521 | 521 | ||