[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dc0b9353-0eea-63e2-ccba-681bd07288b0@gmail.com>
Date: Thu, 21 Oct 2021 08:15:00 -0600
From: David Ahern <dsahern@...il.com>
To: James Prestwood <prestwoj@...il.com>, netdev@...r.kernel.org
Subject: Re: [PATCH v5 2/2] net: ndisc: introduce ndisc_evict_nocarrier sysctl
parameter
On 10/20/21 6:32 PM, James Prestwood wrote:
> diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
> index 184190b9ea25..4db58c29ab53 100644
> --- a/net/ipv6/ndisc.c
> +++ b/net/ipv6/ndisc.c
> @@ -1810,10 +1811,16 @@ static int ndisc_netdev_event(struct notifier_block *this, unsigned long event,
> in6_dev_put(idev);
> break;
> case NETDEV_CHANGE:
> + idev = in6_dev_get(dev);
> + if (!idev)
> + evict_nocarrier = true;
> + else
> + evict_nocarrier = idev->cnf.ndisc_evict_nocarrier;
> +
missing in6_dev_put here
> change_info = ptr;
> if (change_info->flags_changed & IFF_NOARP)
> neigh_changeaddr(&nd_tbl, dev);
> - if (!netif_carrier_ok(dev))
> + if (evict_nocarrier && !netif_carrier_ok(dev))
> neigh_carrier_down(&nd_tbl, dev);
> break;
> case NETDEV_DOWN:
>
Powered by blists - more mailing lists