Use arp_responder for static route ipv4 tests#3791
Merged
shi-su merged 3 commits intosonic-net:masterfrom Jul 19, 2021
Merged
Conversation
|
This pull request fixes 1 alert when merging 245b775 into c711f59 - view on LGTM.com fixed alerts:
|
4 tasks
prsunny
reviewed
Jul 14, 2021
tests/route/test_static_route.py
Outdated
| else: | ||
| vlan_host_map = defaultdict(dict) | ||
| for idx in range(len(nexthop_addrs)): | ||
| mac = VLAN_BASE_MAC_PATTERN.format(idx) |
Contributor
There was a problem hiding this comment.
I think you could get the base mac from the ptf interface itself instead of predefined one. Can you please check?
Contributor
Author
There was a problem hiding this comment.
Thanks for this suggestion. Using the mac from the ptf interface instead.
|
This pull request fixes 1 alert when merging 36e25d3 into bcbbe1a - view on LGTM.com fixed alerts:
|
prsunny
approved these changes
Jul 17, 2021
vmittal-msft
pushed a commit
to vmittal-msft/sonic-mgmt
that referenced
this pull request
Sep 28, 2021
What is the motivation for this PR? In current ipv4 static route test cases, since the nexthops are in the same vlan, the neighbor resolution would end up in the same interface and mac address. This PR fixes the issue by using arp_responder instead of adding IP addresses. How did you do it? Use arp responder for ipv4 static route tests. How did you verify/test it? Run the test cases locally and verify the arp learned as expected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
Summary: Use arp_responder for static route ipv4 tests
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
In current ipv4 static route test cases, since the nexthops are in the same vlan, the neighbor resolution would end up in the same interface and mac address. This PR fixes the issue by using arp_responder instead of adding IP addresses.
How did you do it?
Use arp responder for ipv4 static route tests.
How did you verify/test it?
Run the test cases locally and verify the arp learned as expected.
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation