Skip to content

Commit

Permalink
bonding: improve nl error msg when device can't be enslaved because o…
Browse files Browse the repository at this point in the history
…f 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@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Antoine Tenart authored and David S. Miller committed Aug 16, 2021
1 parent ab63613 commit 1b3f78d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 1b3f78d

Please sign in to comment.