netns: Initialize fl_net in structures allocated with dst_alloc
Subsystems (3)
PATCH 3/4 netns: Initialize fl_net in structures allocated with dst_alloc
From: Eric W. Biederman <[email protected]>
net: Initialize fl_net in structures allocated with dst_alloc
Signed-off-by Eric W. Biederman <[email protected]>
Signed-off-by Denis V. Lunev <[email protected]>
--- net/decnet/dn_route.c | 2 ++ net/ipv4/route.c | 4 ++++ 2 files changed, 6 insertions(+), 0 deletions(-)
net/decnet/dn_route.c +2 -0
@@ -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 ;
net/ipv4/route.c +4 -0
@@ -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;
Signature · 1 line
1.5.3.rc5