[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1cd6612a-8d16-1e78-37cd-b4613b175a61@gmail.com>
Date: Tue, 7 Nov 2017 14:29:57 +0900
From: David Ahern <dsahern@...il.com>
To: Ido Schimmel <idosch@...sch.org>
Cc: netdev@...r.kernel.org, jhs@...atatu.com,
Satish Ashok <sashok@...ulusnetworks.com>
Subject: Re: [PATCH net-next 2/3] net: ipv4: flush neighbor entries when
carrier is off
On 11/6/17 11:49 PM, David Ahern wrote:
>>> diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
>>> index f02819134ba2..aa8fea74858f 100644
>>> --- a/net/ipv4/fib_frontend.c
>>> +++ b/net/ipv4/fib_frontend.c
>>> @@ -1226,10 +1226,13 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vo
>>> break;
>>> case NETDEV_CHANGE:
>>> flags = dev_get_flags(dev);
>>> - if (flags & (IFF_RUNNING | IFF_LOWER_UP))
>>> + if (flags & (IFF_RUNNING | IFF_LOWER_UP)) {
>>> fib_sync_up(dev, RTNH_F_LINKDOWN);
>>> - else
>>> + } else {
>>> fib_sync_down_dev(dev, event, false);
>>> + if (IN_DEV_IGNORE_ROUTES_WITH_LINKDOWN(in_dev))
>>
>> Can you please explain why the flushing is conditioned on this sysctl
>> being enabled? If carrier is down and the sysctl is enabled, then the
>> nexthop will not be used anyway.
you are right, of course. ;-) With the sysctl enabled nexthops with
linkdown have upper_bound set to -1 and will not get selected in
fib_select_multipath.
Jamal: the existing code with the sysctl's enabled should fix your use case.
Powered by blists - more mailing lists