[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210816100828.29252-1-atenart@kernel.org>
Date: Mon, 16 Aug 2021 12:08:28 +0200
From: Antoine Tenart <atenart@...nel.org>
To: davem@...emloft.net, kuba@...nel.org
Cc: Antoine Tenart <atenart@...nel.org>, j.vosburgh@...il.com,
vfalico@...il.com, andy@...yhouse.net, netdev@...r.kernel.org
Subject: [PATCH net-next] bonding: improve nl error msg when device can't be enslaved because of IFF_MASTER
Use a more user friendly netlink error message when a device can't be
enslaved because it has IFF_MASTER, by not referring directly to a
kernel internal flag.
Signed-off-by: Antoine Tenart <atenart@...nel.org>
---
drivers/net/bonding/bond_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 04158a8368e4..b0966e733926 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1759,7 +1759,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev,
if (slave_dev->flags & IFF_MASTER &&
!netif_is_bond_master(slave_dev)) {
BOND_NL_ERR(bond_dev, extack,
- "Device with IFF_MASTER cannot be enslaved");
+ "Device type (master device) cannot be enslaved");
return -EPERM;
}
--
2.31.1
Powered by blists - more mailing lists