bonding: show full hw address in sysfs for slave entries
authorKonstantin Khorenko <khorenko@virtuozzo.com>
Thu, 28 Mar 2019 10:29:21 +0000 (13:29 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 May 2019 05:21:47 +0000 (07:21 +0200)
commit824451fdcfc23d04eefad9e1718b9eb69c97a10a
tree77ed308325ad2ba2b3bdf6b7bbeebe3b781f2699
parentf91bb70a3616a0ecd88e680dd7a3de5349a14355
bonding: show full hw address in sysfs for slave entries

[ Upstream commit 18bebc6dd3281955240062655a4df35eef2c46b3 ]

Bond expects ethernet hwaddr for its slave, but it can be longer than 6
bytes - infiniband interface for example.

 # cat /sys/devices/<skipped>/net/ib0/address
 80:00:02:08:fe:80:00:00:00:00:00:00:7c:fe:90:03:00:be:5d:e1

 # cat /sys/devices/<skipped>/net/ib0/bonding_slave/perm_hwaddr
 80:00:02:08:fe:80

So print full hwaddr in sysfs "bonding_slave/perm_hwaddr" as well.

Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/bonding/bond_sysfs_slave.c