lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Fri, 30 Nov 2007 19:09:40 +0300
From:	"Denis V. Lunev" <den@...nvz.org>
To:	herbert@...dor.apana.org.au
Cc:	devel@...nvz.org, netdev@...r.kernel.org, davem@...emloft.net
Subject: [PATCH 3/4] net: Initialize fl_net in structures allocated with
	dst_alloc

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

net: Initialize fl_net in structures allocated with dst_alloc

Signed-off-by: Eric W. Biederman <ebiederm@...ssion.com>
Signed-off-by: Denis V. Lunev <den@...nvz.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

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists