netns: prevent usage of flowi with not initialized fl_net in routing
Subsystems (3)
PATCH 4/4 netns: prevent usage of flowi with not initialized fl_net in routing
Prevent usage of flowi with not initialized fl_net in routing. This is a temporary measure to simplify maintenance of the patchset.
Signed-off-by Denis V. Lunev <[email protected]>
--- net/ipv4/route.c | 1 + net/ipv6/fib6_rules.c | 1 + net/ipv6/ip6_fib.c | 1 + 3 files changed, 3 insertions(+), 0 deletions(-)
net/ipv4/route.c +1 -0
@@ -2444,6 +2444,7 @@ int ip_route_output_flow(struct rtable **rp, struct flowi *flp, struct sock *sk, {int err; +BUG_ON (flp->fl_net ==NULL );if ((err =__ip_route_output_key (rp, flp)) !=0 )return err;
net/ipv6/fib6_rules.c +1 -0
@@ -38,6 +38,7 @@ struct dst_entry *fib6_rule_lookup(struct flowi *fl, int flags, .lookup_ptr = lookup, }; +BUG_ON (fl->fl_net ==NULL );fib_rules_lookup (&fib6_rules_ops, fl, flags, &arg);if (arg.rule)fib_rule_put (arg.rule);
net/ipv6/ip6_fib.c +1 -0
@@ -282,6 +282,7 @@ struct fib6_table *fib6_get_table(u32 id)struct dst_entry *fib6_rule_lookup (struct flowi *fl,int flags,pol_lookup_t lookup) { +BUG_ON (fl->fl_net ==NULL );return (struct dst_entry *)lookup (&fib6_main_tbl, fl, flags); }
Signature · 1 line
1.5.3.rc5
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 2 lines · Denis V. Lunev
Prevent usage of flowi with not initialized
fl_netin routing. This is a temporary measure to simplify maintenance of the patchset.
Please use WARN_ON, its not nice to crash peoples machines in case you missed something.