Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vlanmgrd]: Fixing an issue causing mismatch between MAC and link-local IPv6 addresses of VLAN and Bridge interfaces #3476

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mramezani95
Copy link
Contributor

@mramezani95 mramezani95 commented Jan 18, 2025

What I did

  1. Added code to bring down the Bridge interface before changing the MAC address of a VLAN interface and the Bridge, and then starting up the Bridge after the MAC is changed. This automatically brings down and starts up all VLAN interfaces added to the Bridge.
  2. Added code to bring down and then immediately start up the Bridge after the dummy interface is started up. This is useful to ensure that MAC and link-local IPv6 addresses of the Bridge are consistent in case no VLANs are added to the Bridge later.
  3. Added a VS test to verify these behaviors.

Why I did it
After PR #3370, the Bridge becomes operationally UP after the dummy interface is started up. As a result, all VLAN interfaces created under the Bridge are immediately operationally UP after creation. This can cause an issue later if their MAC address is changed since the kernel does not update the link-local IPv6 address of an interface if it is operationally UP. This behavior caused the IPv6 version of the following test cases in sonic-mgmt to fail for the dualtor topology, which were temporarily skipped:

arp/test_arp_dualtor.py::test_arp_update_for_failed_standby_neighbor
arp/test_arp_dualtor.py::test_standby_unsolicited_neigh_learning
arp/test_arp_extended.py::test_proxy_arp

How I verified it

  1. Verified that the above sonic-mgmt tests can be passed after this change.
  2. Verified that the link-local IPv6 addresses are updated correctly after the Bridge is brought down and started up again.

… link-local IPv6 address of VLAN and Bridge interfaces matches their MAC address. Also added VS tests to verify this.

Signed-off-by: Mahdi Ramezani <[email protected]>
@mramezani95 mramezani95 requested a review from prsunny as a code owner January 18, 2025 09:38
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mramezani95
Copy link
Contributor Author

/azp run

Copy link

Commenter does not have sufficient privileges for PR 3476 in repo sonic-net/sonic-swss

@mramezani95
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants