From: "Denis V. Lunev" <den@openvz.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, devel@openvz.org,
containers@lists.osdl.org, "Denis V. Lunev" <den@openvz.org>
Subject: [PATCH 7/12 net-2.6.25] [NETNS]: Add namespace parameter to __ip_route_output_key.
Date: Tue, 22 Jan 2008 18:59:24 +0300 [thread overview]
Message-ID: <1201017566-16985-7-git-send-email-den@openvz.org> (raw)
In-Reply-To: <479612BE.8030409@openvz.org>
This is only required to propagate it down to the ip_route_output_slow.
Signed-off-by: Denis V. Lunev <den@openvz.org>
---
include/net/route.h | 4 ++--
net/ipv4/icmp.c | 4 ++--
net/ipv4/route.c | 7 ++++---
net/ipv4/xfrm4_policy.c | 2 +-
4 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/include/net/route.h b/include/net/route.h
index 5847e6f..3e3b14e 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -110,7 +110,7 @@ extern int ip_rt_init(void);
extern void ip_rt_redirect(__be32 old_gw, __be32 dst, __be32 new_gw,
__be32 src, struct net_device *dev);
extern void rt_cache_flush(int how);
-extern int __ip_route_output_key(struct rtable **, const struct flowi *flp);
+extern int __ip_route_output_key(struct net *, struct rtable **, const struct flowi *flp);
extern int ip_route_output_key(struct rtable **, struct flowi *flp);
extern int ip_route_output_flow(struct rtable **rp, struct flowi *flp, struct sock *sk, int flags);
extern int ip_route_input(struct sk_buff*, __be32 dst, __be32 src, u8 tos, struct net_device *devin);
@@ -158,7 +158,7 @@ static inline int ip_route_connect(struct rtable **rp, __be32 dst,
int err;
if (!dst || !src) {
- err = __ip_route_output_key(rp, &fl);
+ err = __ip_route_output_key(&init_net, rp, &fl);
if (err)
return err;
fl.fl4_dst = (*rp)->rt_dst;
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index 7ed8c50..21422bf 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -569,7 +569,7 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)
struct rtable *rt2;
security_skb_classify_flow(skb_in, &fl);
- if (__ip_route_output_key(&rt, &fl))
+ if (__ip_route_output_key(&init_net, &rt, &fl))
goto out_unlock;
/* No need to clone since we're just using its address. */
@@ -592,7 +592,7 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)
goto out_unlock;
if (inet_addr_type(&init_net, fl.fl4_src) == RTN_LOCAL)
- err = __ip_route_output_key(&rt2, &fl);
+ err = __ip_route_output_key(&init_net, &rt2, &fl);
else {
struct flowi fl2 = {};
struct dst_entry *odst;
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index c1f9950..cb035cc 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2442,7 +2442,8 @@ make_route:
out: return err;
}
-int __ip_route_output_key(struct rtable **rp, const struct flowi *flp)
+int __ip_route_output_key(struct net *net, struct rtable **rp,
+ const struct flowi *flp)
{
unsigned hash;
struct rtable *rth;
@@ -2469,7 +2470,7 @@ int __ip_route_output_key(struct rtable **rp, const struct flowi *flp)
}
rcu_read_unlock_bh();
- return ip_route_output_slow(&init_net, rp, flp);
+ return ip_route_output_slow(net, rp, flp);
}
EXPORT_SYMBOL_GPL(__ip_route_output_key);
@@ -2535,7 +2536,7 @@ int ip_route_output_flow(struct rtable **rp, struct flowi *flp, struct sock *sk,
{
int err;
- if ((err = __ip_route_output_key(rp, flp)) != 0)
+ if ((err = __ip_route_output_key(&init_net, rp, flp)) != 0)
return err;
if (flp->proto) {
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c
index f04516c..3783e3e 100644
--- a/net/ipv4/xfrm4_policy.c
+++ b/net/ipv4/xfrm4_policy.c
@@ -36,7 +36,7 @@ static struct dst_entry *xfrm4_dst_lookup(int tos, xfrm_address_t *saddr,
if (saddr)
fl.fl4_src = saddr->a4;
- err = __ip_route_output_key(&rt, &fl);
+ err = __ip_route_output_key(&init_net, &rt, &fl);
dst = &rt->u.dst;
if (err)
dst = ERR_PTR(err);
--
1.5.3.rc5
next prev parent reply other threads:[~2008-01-22 15:59 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-22 15:58 [PATCH 0/12 net-2.6.25] [NETNS]: Routing namespacing on IP output path Denis V. Lunev
2008-01-22 15:59 ` [PATCH 1/12 net-2.6.25] [IPV4]: Declarations cleanup in ip_fib.h Denis V. Lunev
2008-01-22 15:59 ` [PATCH 2/12 net-2.6.25] [IPV4]: Consolidate fib_select_default Denis V. Lunev
2008-01-22 15:59 ` [PATCH 3/12 net-2.6.25] [NETNS]: Add netns parameter to fib_select_default Denis V. Lunev
2008-01-22 15:59 ` [PATCH 4/12 net-2.6.25] [NETNS]: Add namespace parameter to ip_dev_find Denis V. Lunev
2008-01-22 15:59 ` [PATCH 5/12 net-2.6.25] [NETNS]: Re-export init_net via EXPORT_SYMBOL Denis V. Lunev
2008-01-22 17:04 ` Patrick McHardy
2008-01-22 17:19 ` Denis V. Lunev
2008-01-23 6:08 ` David Miller
2008-01-22 15:59 ` [PATCH 6/12 net-2.6.25] [NETNS]: Add namespace parameter to ip_route_output_slow Denis V. Lunev
2008-01-22 15:59 ` Denis V. Lunev [this message]
2008-01-22 15:59 ` [PATCH 8/12 net-2.6.25] [NETNS]: Add namespace parameter to ip_route_output_flow Denis V. Lunev
2008-01-22 15:59 ` [PATCH 9/12 net-2.6.25] [NETNS]: Add namespace parameter to ip_route_output_key Denis V. Lunev
2008-01-23 6:09 ` [PATCH 0/12 net-2.6.25] [NETNS]: Routing namespacing on IP output path David Miller
2008-01-23 7:46 ` [PATCH 10/12 net-2.6.25] [NETNS]: Correct namespace for connect-time routing Denis V. Lunev
2008-01-23 7:51 ` David Miller
2008-01-23 7:46 ` [PATCH 11/12 net-2.6.25] [NETNS]: Routing cache virtualization Denis V. Lunev
2008-01-23 7:51 ` David Miller
2008-01-23 7:46 ` [PATCH 12/12 net-2.6.25] [NETNS]: Add namespace for ICMP replying code Denis V. Lunev
2008-01-23 7:51 ` David Miller
[not found] ` <20080122.235130.84789113.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2008-01-23 9:16 ` Mathieu Lacage
2008-01-23 9:30 ` YOSHIFUJI Hideaki / 吉藤英明
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=1201017566-16985-7-git-send-email-den@openvz.org \
--to=den@openvz.org \
--cc=containers@lists.osdl.org \
--cc=davem@davemloft.net \
--cc=devel@openvz.org \
--cc=netdev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox