All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Denis V. Lunev" <den@openvz.org>
To: herbert@gondor.apana.org.au
Cc: devel@openvz.org, netdev@vger.kernel.org, davem@davemloft.net
Subject: [PATCH 3/4] net: Initialize fl_net in structures allocated with dst_alloc
Date: Fri, 30 Nov 2007 19:09:40 +0300	[thread overview]
Message-ID: <20071130160940.GA10189@iris.sw.ru> (raw)

From: Eric W. Biederman <ebiederm@xmission.com>

net: Initialize fl_net in structures allocated with dst_alloc

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
---
 net/decnet/dn_route.c |    2 ++
 net/ipv4/route.c      |    4 ++++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
index c353de0..1b5b9ce 100644
--- a/net/decnet/dn_route.c
+++ b/net/decnet/dn_route.c
@@ -1093,6 +1093,7 @@ make_route:
 	atomic_set(&rt->u.dst.__refcnt, 1);
 	rt->u.dst.flags   = DST_HOST;
 
+	rt->fl.fl_net     = &init_net;
 	rt->fl.fld_src    = oldflp->fld_src;
 	rt->fl.fld_dst    = oldflp->fld_dst;
 	rt->fl.oif        = oldflp->oif;
@@ -1363,6 +1364,7 @@ make_route:
 	rt->rt_dst_map    = fl.fld_dst;
 	rt->rt_src_map    = fl.fld_src;
 
+	rt->fl.fl_net     = &init_net;
 	rt->fl.fld_src    = cb->src;
 	rt->fl.fld_dst    = cb->dst;
 	rt->fl.oif        = 0;
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index dae1290..84a7f32 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1567,6 +1567,7 @@ static int ip_route_input_mc(struct sk_buff *skb, __be32 daddr, __be32 saddr,
 	rth->u.dst.flags= DST_HOST;
 	if (IN_DEV_CONF_GET(in_dev, NOPOLICY))
 		rth->u.dst.flags |= DST_NOPOLICY;
+	rth->fl.fl_net	= &init_net;
 	rth->fl.fl4_dst	= daddr;
 	rth->rt_dst	= daddr;
 	rth->fl.fl4_tos	= tos;
@@ -1707,6 +1708,7 @@ static inline int __mkroute_input(struct sk_buff *skb,
 		rth->u.dst.flags |= DST_NOPOLICY;
 	if (IN_DEV_CONF_GET(out_dev, NOXFRM))
 		rth->u.dst.flags |= DST_NOXFRM;
+	rth->fl.fl_net	= &init_net;
 	rth->fl.fl4_dst	= daddr;
 	rth->rt_dst	= daddr;
 	rth->fl.fl4_tos	= tos;
@@ -1887,6 +1889,7 @@ local_input:
 	rth->u.dst.flags= DST_HOST;
 	if (IN_DEV_CONF_GET(in_dev, NOPOLICY))
 		rth->u.dst.flags |= DST_NOPOLICY;
+	rth->fl.fl_net	= &init_net;
 	rth->fl.fl4_dst	= daddr;
 	rth->rt_dst	= daddr;
 	rth->fl.fl4_tos	= tos;
@@ -2078,6 +2081,7 @@ static inline int __mkroute_output(struct rtable **result,
 	if (IN_DEV_CONF_GET(in_dev, NOPOLICY))
 		rth->u.dst.flags |= DST_NOPOLICY;
 
+	rth->fl.fl_net	= &init_net;
 	rth->fl.fl4_dst	= oldflp->fl4_dst;
 	rth->fl.fl4_tos	= tos;
 	rth->fl.fl4_src	= oldflp->fl4_src;
-- 
1.5.3.rc5


                 reply	other threads:[~2007-11-30 16:08 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=20071130160940.GA10189@iris.sw.ru \
    --to=den@openvz.org \
    --cc=davem@davemloft.net \
    --cc=devel@openvz.org \
    --cc=herbert@gondor.apana.org.au \
    --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 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.