From: Pavel Emelyanov <xemul@openvz.org>
To: dccp@vger.kernel.org
Subject: [RFC][PATCH 5/12][NETNS][DCCPV4]: Use proper net to route the reset
Date: Tue, 08 Apr 2008 16:57:58 +0000 [thread overview]
Message-ID: <47FBA97B.8050309@openvz.org> (raw)
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>
---
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 cad62d8..11d0b85 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)
return sk;
}
-static struct dst_entry* dccp_v4_route_skb(struct sock *sk,
+static struct dst_entry* dccp_v4_route_skb(struct net *net, struct sock *sk,
struct sk_buff *skb)
{
struct rtable *rt;
@@ -462,7 +462,7 @@ static struct dst_entry* dccp_v4_route_skb(struct sock *sk,
};
security_skb_classify_flow(skb, &fl);
- if (ip_route_output_flow(&init_net, &rt, &fl, sk, 0)) {
+ if (ip_route_output_flow(net, &rt, &fl, sk, 0)) {
IP_INC_STATS_BH(IPSTATS_MIB_OUTNOROUTES);
return NULL;
}
@@ -515,7 +515,7 @@ static void dccp_v4_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb)
if (rxskb->rtable->rt_type != RTN_LOCAL)
return;
- dst = dccp_v4_route_skb(ctl_sk, rxskb);
+ dst = dccp_v4_route_skb(net, ctl_sk, rxskb);
if (dst = NULL)
return;
--
1.5.3.4
reply other threads:[~2008-04-08 16:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47FBA97B.8050309@openvz.org \
--to=xemul@openvz.org \
--cc=dccp@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.