lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 2 Mar 2016 10:17:19 -0800
From:	David Ahern <dsa@...ulusnetworks.com>
To:	Andy Gospodarek <gospo@...ulusnetworks.com>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] ipv4: properly apply change to
 ignore_routes_on_linkdown to all interfaces

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ