Message ID | 20210816100828.29252-1-atenart@kernel.org |
---|---|
State | New |
Headers | show |
Series | [net-next] bonding: improve nl error msg when device can't be enslaved because of IFF_MASTER | expand |
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; }
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@kernel.org> --- drivers/net/bonding/bond_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)