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]
Message-Id: <1227557174.3162.7.camel@achroite>
Date:	Mon, 24 Nov 2008 20:06:14 +0000
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Stephen Hemminger <shemminger@...tta.com>
Cc:	Kay Sievers <kay.sievers@...y.org>,
	David Miller <davem@...emloft.net>,
	Marcel Holtmann <marcel@...tmann.org>,
	linux-hotplug@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH] netdev: generate kobject uevent on network events.

On Mon, 2008-11-24 at 11:45 -0800, Stephen Hemminger wrote:
[...]
> +	case NETDEV_CHANGE:
> +		if (netif_running(netdev)) {
> +			char str[64] = "DEVSTATE=UP";
> +			char *envp[2] = { str, NULL };
> +
> +			if (netif_oper_up(netdev))
> +				strcat(str, ",RUNNING");
> +			if (netif_carrier_ok(netdev))
> +				strcat(str, ",LOWER_UP");
> +			if (netif_dormant(netdev))
> +				strcat(str, ",DORMANT");
> +			kobject_uevent_env(&netdev->dev.kobj, KOBJ_CHANGE, envp);
> +		}
> +		break;

Unless I'm much mistaken, NETDEV_CHANGE should only be generated when
netif_running() is true, so the test is redundant.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ