Commit cba45a0
committed
port: prevent disabling forced promiscuous and allmulti modes
When a port MAC filter table reaches its hardware limit or if the driver
does not support individual address filtering, the code falls back to
enabling promisc or allmulti mode to ensure all required traffic is
still received. However, other code paths that manage these modes were
unaware of this fallback mechanism and could inadvertently disable them,
breaking MAC address filtering.
Introduce two new interface state flags to track when promisc or
allmulti modes have been force-enabled due to MAC filter
overflow/unsupported. The port_promisc_set() and port_allmulti_set()
functions now check these forced states and refuse to modify the
hardware state when the mode is required for filtering.
Update the CLI to distinguish between user-requested and filter-forced
modes by displaying "promisc(forced)" or "allmulti(forced)" when
applicable.
Signed-off-by: Robin Jarry <[email protected]>1 parent 5ed23e6 commit cba45a0
3 files changed
Lines changed: 28 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
128 | 130 | | |
129 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
130 | 134 | | |
131 | 135 | | |
132 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
202 | 204 | | |
203 | 205 | | |
204 | 206 | | |
| |||
224 | 226 | | |
225 | 227 | | |
226 | 228 | | |
227 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
228 | 232 | | |
229 | 233 | | |
230 | 234 | | |
| |||
562 | 566 | | |
563 | 567 | | |
564 | 568 | | |
565 | | - | |
| 569 | + | |
566 | 570 | | |
567 | | - | |
| 571 | + | |
568 | 572 | | |
569 | | - | |
| 573 | + | |
570 | 574 | | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
571 | 579 | | |
572 | 580 | | |
573 | 581 | | |
| |||
638 | 646 | | |
639 | 647 | | |
640 | 648 | | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
645 | 656 | | |
646 | 657 | | |
647 | 658 | | |
| |||
0 commit comments