This patch fixes a bug in the proc file handler in bonding. The name of
the primary slave was taken from the command-line options, instead of from
the dev structure of the primary slave itself. This caused an incorrect
display if the primary is set or changed via sysfs.
Signed-off-by: Radheka Godse <radheka.godse@xxxxxxxxx>
Signed-off-by: Mitch Williams <mitch.a.williams@xxxxxxxxx>
diff -urN -X dontdiff linux-2.6.12-rc2clean/drivers/net/bonding/bond_main.c
linux-2.6.12-rc2/drivers/net/bonding/bond_main.c
--- linux-2.6.12-rc2clean/drivers/net/bonding/bond_main.c 2005-04-07
11:24:41.000000000 -0700
+++ linux-2.6.12-rc2/drivers/net/bonding/bond_main.c 2005-04-07
14:35:41.000000000 -0700
@@ -3166,8 +3166,8 @@
if (USES_PRIMARY(bond->params.mode)) {
seq_printf(seq, "Primary Slave: %s\n",
- (bond->params.primary[0]) ?
- bond->params.primary : "None");
+ (bond->primary_slave) ?
+ bond->primary_slave->dev->name : "None");
seq_printf(seq, "Currently Active Slave: %s\n",
(curr) ? curr->dev->name : "None");
|