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

[master]fix dhcpv6 relay dual tor source interface selection issue #42

Merged
merged 2 commits into from
Jul 17, 2023

Conversation

jcaiMR
Copy link
Contributor

@jcaiMR jcaiMR commented Jul 11, 2023

Description of PR

[master] Fix DHCPv6 relay dual-tor relay-reply handling issue.

Other related docker change PR:
https://github.com/sonic-net/sonic-buildimage/pull/15744/files

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911
  • 202012
  • 202205

Approach

What is the motivation for this PR?

Fix DHCPv6 relay dual-tor relay-reply handling issue. In dual-tor scenario, we need responses from dhcpv6 server send to Active tor. Based on RFC8415 session [18.3.10], DHCPv6 server unicasts the Relay-reply message directly to the relay agent using the address in the source address field from the IP datagram in which the Relay-forward message was received. So in dual-tor we need use DUT unique loopback ipv6 address as relay-forward source (Vlan IPv6 is same on both active tor and standby tor).

Main changed in this PR:

  1. Use loopback0 as relay-forward source interface, create loopback0 socket for packet sending and listening
  2. Fix multiple level relay agent case: Relay-Reply send to next level relay agent will use GUA instead of LLA as source address, and dest port should use 547
  3. Multiple level relay-forward will insert option18 to carry vlan information, and relay agent will get vlan info from response to update counters in this case.
  4. Code cleanup after apply latest code change

How did you do it?

How did you verify/test it?

single-tor sanity testing no issue
dual-tor function test

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@jcaiMR jcaiMR requested review from kellyyeh, vivekrnv and yxieca July 11, 2023 15:28
@jcaiMR jcaiMR changed the title fix dhcpv6 relay dual tor source interface selection issue [master]fix dhcpv6 relay dual tor source interface selection issue Jul 12, 2023
@jcaiMR jcaiMR force-pushed the dev/jcai_dualtor_fix branch 3 times, most recently from 9dd9977 to 2f95a11 Compare July 12, 2023 09:11
@jcaiMR jcaiMR force-pushed the dev/jcai_dualtor_fix branch from 2f95a11 to 33d8436 Compare July 12, 2023 09:23
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.

3 participants