diff options
-rw-r--r-- | Documentation/networking/bonding.txt | 3 | ||||
-rw-r--r-- | drivers/net/bonding/bond_options.c | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt index a4d925e4ba7a..5cdb22971d19 100644 --- a/Documentation/networking/bonding.txt +++ b/Documentation/networking/bonding.txt @@ -657,7 +657,8 @@ primary one slave is preferred over another, e.g., when one slave has higher throughput than another. - The primary option is only valid for active-backup mode. + The primary option is only valid for active-backup(1), + balance-tlb (5) and balance-alb (6) mode. primary_reselect diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c index 05a402c99bff..4cee04aa6eb3 100644 --- a/drivers/net/bonding/bond_options.c +++ b/drivers/net/bonding/bond_options.c @@ -1021,6 +1021,12 @@ int bond_option_primary_set(struct bonding *bond, struct bond_opt_value *newval) } } + if (bond->primary_slave) { + pr_info("%s: Setting primary slave to None.\n", + bond->dev->name); + bond->primary_slave = NULL; + bond_select_active_slave(bond); + } strncpy(bond->params.primary, primary, IFNAMSIZ); bond->params.primary[IFNAMSIZ - 1] = 0; |