[dir_bcast] Fix issue of dir_bcast testing#771
[dir_bcast] Fix issue of dir_bcast testing#771lguohan merged 3 commits intosonic-net:masterfrom wangxin:dir-bcast
Conversation
If DHCP relay server is configured, the injected packet would be forwarded to the DHCP servers. Replace the injected BOOTP UDP packet with ordinary IP packet to ensure that it is broadcasted to all interfaces of the VLAN. Signed-off-by: Xin Wang <xinw@mellanox.com>
Change the source IP address of injected packets to 1.1.1.1 Signed-off-by: Xin Wang <xinw@mellanox.com>
|
The intention of this test is to verify mainly the DHCP directed broadcast. The packet forwarding should happen in ASIC for the DHCP packet that is being sent to directed broadcast address which in this case would get forwarded to all member ports of Vlan. I would like to understand, how does this get bypass and forward only to the configured server? |
|
@liat-grozovik, Itai - Is this behavior seen coz current MLNX SAI has L2 DHCP trap instead of L3 DHCP trap? Once it is fixed in SAI, this could be retested to verify the behavior. |
|
@prsunny
For both scenarios, should the injected packet be forwarded to all members of VLAN? |
|
@wangxin , yes for both scenarios, the packet must be forwarded to all members of Vlan. That's my point as well. So why do you have to change DHCP to ordinary IP packet? |
|
@prsunny , |
|
Hi, @prsunny, I just got confirmation from Itai. The new behavior will be to trap DHCP at L3. Only broadcast DHCP packets will be trapped. Directed broadcast DHCP packets will be handled as ordinary IP packet. I will change this script to cover both directed broadcast DHCP and non-DHCP IP packets. |
lguohan
left a comment
There was a problem hiding this comment.
based on discussion in the thread.
Both directed broadcast DHCP and non-DHCP packets should be broadcasted to all members of VLAN. Add code for checking directed broadcast of DHCP packets along with non-DHCP packets. Signed-off-by: Xin Wang <xinw@mellanox.com>
|
Committed another fix. Added checking of DHCP packets. What the script does now:
|
|
@lguohan as all comments were addresses, can you please help review and merge? |
|
|
||
| #--------------------------------------------------------------------- | ||
|
|
||
| def check_bootp_dir_bcast(self, dst_bcast_ip, dst_port_list): |
There was a problem hiding this comment.
To me it looks like most of the functionality except the packet is same for both functions. We could create a single function for common code and use these functions only to create the packet. Approving from my side!
|
@lguohan please review fixes following your comments. |
…ty related errors (sonic-net#20596) (sonic-net#771) Cherry-pick sonic-net#20596 What is the motivation for this PR? Add regex to skip sai_query_attribute_capability related loganalyzer errors How did you do it? Added 2 regex to loganalyzer_common_ignore.txt file to ignore sai_query_attribute_enum_values_capability "rv=-8", ignoring non-functional error in swss PR pipeline till Fix switch capabilities enum query with metadata validation sonic-swss#3866 is merged sai_query_attribute_capability "error -2", ignoring till it gets fixed from SAI, CS00012422823 is raised How did you verify/test it? Tested on Arista-7050X3 running dualtor-aa topology
This update includes the following changes > [syncd armhf] Fix syncd crash when running community test suites (sonic-net#777) > Revert "[tests]:Add unittest for MACsec on p2p establishment (sonic-net#771)" > [tests]:Add unittest for MACsec on p2p establishment (sonic-net#771) > [tests] Enable azure pipeline make check to respect unittests (sonic-net#760)
[dir_bcast] Fix issue of dir_bcast testing
If DHCP relay server is configured on DUT, the injected packet would be
forwarded to the DHCP servers. This fix replaced the injected BOOTP UDP packet
with ordinary IP packet to ensure that it is broadcasted to all
interfaces of the VLAN.
Signed-off-by: Xin Wang xinw@mellanox.com
Description of PR
Summary:
If DHCP relay server is configured, the injected BOOTP packet would be unicast to the configured DHCP servers and this test case would fail. This fix replaced the injected BOOTP packet with ordinary IP packet. Then the injected packet will be broadcasted to all the destination VLAN interfaces.
Type of change
Approach
How did you do it?
Replace the injected BOOTP packet with an ordinary IP packet.
How did you verify/test it?
Tested on Mellanox platform running t0 topology. Used the latest image from master branch.
Any platform specific information?
N/A
Supported testbed topology if it's a new test case?
Documentation