From: David Ahern <dsa@cumulusnetworks.com>
To: Andy Gospodarek <gospo@cumulusnetworks.com>, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] ipv4: properly apply change to ignore_routes_on_linkdown to all interfaces
Date: Wed, 2 Mar 2016 10:17:19 -0800 [thread overview]
Message-ID: <56D72E2F.30207@cumulusnetworks.com> (raw)
In-Reply-To: <1456936986-2042-1-git-send-email-gospo@cumulusnetworks.com>
On 3/2/16 8:43 AM, Andy Gospodarek wrote:
>
> +/* called with RTNL locked */
> +static void inet_ignore_routes_change(struct net *net)
> +{
> + struct net_device *dev;
> + int on = IPV4_DEVCONF_ALL(net, IGNORE_ROUTES_WITH_LINKDOWN);
> +
> + IPV4_DEVCONF_DFLT(net, IGNORE_ROUTES_WITH_LINKDOWN) = on;
> + inet_netconf_notify_devconf(net, NETCONFA_IGNORE_ROUTES_WITH_LINKDOWN,
> + NETCONFA_IFINDEX_ALL,
> + net->ipv4.devconf_all);
> + inet_netconf_notify_devconf(net, NETCONFA_IGNORE_ROUTES_WITH_LINKDOWN,
> + NETCONFA_IFINDEX_DEFAULT,
> + net->ipv4.devconf_dflt);
> +
> + for_each_netdev(net, dev) {
> + struct in_device *in_dev;
> +
> + rcu_read_lock();
> + in_dev = __in_dev_get_rcu(dev);
> + if (in_dev) {
> + IN_DEV_CONF_SET(in_dev,
> + IGNORE_ROUTES_WITH_LINKDOWN, on);
> + inet_netconf_notify_devconf(net,
> + NETCONFA_IGNORE_ROUTES_WITH_LINKDOWN,
> + dev->ifindex, &in_dev->cnf);
> + }
> + rcu_read_unlock();
> + }
> +}
> +
This seems wrong -- changing the 'all' and 'default' settings for a
sysctl should not require walking the interface list.
next prev parent reply other threads:[~2016-03-02 18:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-02 16:43 [PATCH net-next] ipv4: properly apply change to ignore_routes_on_linkdown to all interfaces Andy Gospodarek
2016-03-02 18:17 ` David Ahern [this message]
2016-03-02 18:28 ` Andy Gospodarek
2016-03-02 18:36 ` David Ahern
2016-03-02 18:46 ` Andy Gospodarek
2016-03-07 3:38 ` David Miller
2016-03-07 13:21 ` Andy Gospodarek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56D72E2F.30207@cumulusnetworks.com \
--to=dsa@cumulusnetworks.com \
--cc=gospo@cumulusnetworks.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.