From 6f70ad9198212babafbe0178a910ddba2b955091 Mon Sep 17 00:00:00 2001 From: Amit Pundir Date: Mon, 9 Jul 2018 12:20:13 +0530 Subject: RFC: ANDROID: net: ipv6: Flip FIB entries to fib6_info Convert all code paths referencing a FIB entry from rt6_info to fib6_info. Align with upstream commit 8d1c802b2815 ("net/ipv6: Flip FIB entries to fib6_info") changes. Fixes: Change-Id: I82d16e3737d9cdfa6489e649e247894d0d60cbb1 ("ANDROID: net: ipv6: autoconf routes into per-device tables") Signed-off-by: Amit Pundir --- net/ipv6/route.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/net/ipv6/route.c b/net/ipv6/route.c index d595ca084503..7d5ff7e66665 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -3583,10 +3583,15 @@ struct fib6_info *rt6_add_dflt_router(struct net *net, return rt6_get_dflt_router(net, gwaddr, dev); } -int rt6_addrconf_purge(struct rt6_info *rt, void *arg) { - if (rt->rt6i_flags & (RTF_DEFAULT | RTF_ADDRCONF) && - (!rt->rt6i_idev || rt->rt6i_idev->cnf.accept_ra != 2)) +int rt6_addrconf_purge(struct fib6_info *rt, void *arg) +{ + struct net_device *dev = fib6_info_nh_dev(rt); + struct inet6_dev *idev = dev ? __in6_dev_get(dev) : NULL; + + if (rt->fib6_flags & (RTF_DEFAULT | RTF_ADDRCONF) && + (!idev || idev->cnf.accept_ra != 2)) return -1; + return 0; } -- cgit v1.2.3