Commit 45fc134
bonding: do not set usable_slaves for broadcast mode
After commit e0caeb2 ("net: bonding: update the slave array for broadcast mode"),
broadcast mode will also set all_slaves and usable_slaves during
bond_enslave(). But if we also set updelay, during enslave, the
slave init state will be BOND_LINK_BACK. And later
bond_update_slave_arr() will alloc usable_slaves but add nothing.
This will cause bond_miimon_inspect() to have ignore_updelay
always true. So the updelay will be always ignored. e.g.
[ 6.498368] bond0: (slave veth2): link status definitely down, disabling slave
[ 7.536371] bond0: (slave veth2): link status up, enabling it in 0 ms
[ 7.536402] bond0: (slave veth2): link status definitely up, 10000 Mbps full duplex
To fix it, we can either always call bond_update_slave_arr() on every
place when link changes. Or, let's just not set usable_slaves for
broadcast mode.
Fixes: e0caeb2 ("net: bonding: update the slave array for broadcast mode")
Reported-by: Liang Li <[email protected]>
Signed-off-by: Hangbin Liu <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>1 parent 224a0d2 commit 45fc134
1 file changed
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5069 | 5069 | | |
5070 | 5070 | | |
5071 | 5071 | | |
5072 | | - | |
5073 | | - | |
5074 | | - | |
5075 | | - | |
5076 | 5072 | | |
5077 | 5073 | | |
5078 | 5074 | | |
| 5075 | + | |
| 5076 | + | |
| 5077 | + | |
| 5078 | + | |
| 5079 | + | |
| 5080 | + | |
| 5081 | + | |
| 5082 | + | |
| 5083 | + | |
5079 | 5084 | | |
5080 | 5085 | | |
5081 | 5086 | | |
| |||
0 commit comments