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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190719205849.11d17192@cakuba>
Date:   Fri, 19 Jul 2019 20:58:49 -0700
From:   Jakub Kicinski <jakub.kicinski@...ronome.com>
To:     Jiri Pirko <jiri@...nulli.us>
Cc:     netdev@...r.kernel.org, davem@...emloft.net,
        sthemmin@...rosoft.com, dsahern@...il.com, dcbw@...hat.com,
        mkubecek@...e.cz, andrew@...n.ch, parav@...lanox.com,
        saeedm@...lanox.com, mlxsw@...lanox.com
Subject: Re: [patch net-next rfc 3/7] net: rtnetlink: add commands to add
 and delete alternative ifnames

On Fri, 19 Jul 2019 13:00:25 +0200, Jiri Pirko wrote:
> +int netdev_name_node_alt_destroy(struct net_device *dev, char *name)
> +{
> +	struct netdev_name_node *name_node;
> +	struct net *net = dev_net(dev);
> +
> +	name_node = netdev_name_node_lookup(net, name);
> +	if (!name_node)
> +		return -ENOENT;
> +	__netdev_name_node_alt_destroy(name_node);
> +
> +	return 0;
> +}
> +EXPORT_SYMBOL(netdev_name_node_alt_destroy);

I was surprised to see the exports are they strictly necessary?
Just wondering..

> @@ -8258,6 +8313,7 @@ static void rollback_registered_many(struct list_head *head)
>  		dev_uc_flush(dev);
>  		dev_mc_flush(dev);
>  
> +		netdev_name_node_alt_flush(dev);
>  		netdev_name_node_free(dev->name_node);
>  
>  		if (dev->netdev_ops->ndo_uninit)
> diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
> index 1ee6460f8275..7a2010b16e10 100644
> --- a/net/core/rtnetlink.c
> +++ b/net/core/rtnetlink.c
> @@ -1750,6 +1750,8 @@ static const struct nla_policy ifla_policy[IFLA_MAX+1] = {
>  	[IFLA_CARRIER_DOWN_COUNT] = { .type = NLA_U32 },
>  	[IFLA_MIN_MTU]		= { .type = NLA_U32 },
>  	[IFLA_MAX_MTU]		= { .type = NLA_U32 },
> +	[IFLA_ALT_IFNAME_MOD]	= { .type = NLA_STRING,
> +				    .len = ALTIFNAMSIZ - 1 },

Should we set:

	.strict_start_type = IFLA_ALT_IFNAME_MOD

?

>  };
>  
>  static const struct nla_policy ifla_info_policy[IFLA_INFO_MAX+1] = {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ