Commit 7a8024a
authored
Prevent user from adding more then a single untagged VLAN to an interface (sonic-net#1382)
Fix for sonic-net#6421
**- What I did**
User was able to add an interface to multiple VLANs as untagged. Added a validation to a single untagged member.
**- How I did it**
Added a validation when adding a port as untagged to check in DB if is already member as untagged in a different vlan.
**- How to verify it**
Add vlan, add interface as untagged member in this vlan, add another vlan, try to add the same interface as untagged member in the new vlan.
**- Previous command output (if the output of a command-line utility has changed)**
Command was successful.
**- New command output (if the output of a command-line utility has changed)**
Fail in VLAN membership.
Error: Ethernet8 is already untagged member!1 parent 41e62c6 commit 7a8024a
3 files changed
+42
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
139 | 142 | | |
140 | 143 | | |
141 | 144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
597 | 597 | | |
598 | 598 | | |
599 | 599 | | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
600 | 629 | | |
601 | 630 | | |
602 | 631 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
544 | 544 | | |
545 | 545 | | |
546 | 546 | | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
0 commit comments