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: <20190720072037.GI2230@nanopsycho>
Date:   Sat, 20 Jul 2019 09:20:37 +0200
From:   Jiri Pirko <jiri@...nulli.us>
To:     Jakub Kicinski <jakub.kicinski@...ronome.com>
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

Sat, Jul 20, 2019 at 05:58:49AM CEST, jakub.kicinski@...ronome.com wrote:
>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?

Well I call them from net/core/rtnetlink.c, so yes. Maybe I'm missing
your point...


>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

Probably yes. Will add it.


>
>?
>
>>  };
>>  
>>  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