[dhcpmon] Filter DHCP O/A Messages of Neighboring Vlans#4469
Merged
tahmed-dev merged 10 commits intosonic-net:masterfrom Apr 28, 2020
Merged
[dhcpmon] Filter DHCP O/A Messages of Neighboring Vlans#4469tahmed-dev merged 10 commits intosonic-net:masterfrom
tahmed-dev merged 10 commits intosonic-net:masterfrom
Conversation
This code fixes a bug where two or more vlans exist. Cross contamination happens for DHCP packets Offer/Ack when received on shared northbound links. The code filters out those packet based on dst IP equal Vlan loopback IP. signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
based on ip src/dst for vm-relay link
lguohan
reviewed
Apr 23, 2020
jleveque
reviewed
Apr 25, 2020
jleveque
previously approved these changes
Apr 28, 2020
pavel-shirshov
suggested changes
Apr 28, 2020
Contributor
pavel-shirshov
left a comment
There was a problem hiding this comment.
Can you please add comments into the function?
pavel-shirshov
previously approved these changes
Apr 28, 2020
0da9789
jleveque
previously approved these changes
Apr 28, 2020
Contributor
jleveque
left a comment
There was a problem hiding this comment.
Approved with minor suggestion.
640219a
jleveque
approved these changes
Apr 28, 2020
pavel-shirshov
approved these changes
Apr 28, 2020
yxieca
pushed a commit
that referenced
this pull request
Apr 28, 2020
* [dhcpmon] Filter DHCP O/A Messages of Neighboring Vlans This code fixes a bug where two or more vlans exist. Cross contamination happens for DHCP packets Offer/Ack when received on shared northbound links. The code filters out those packet based on dst IP equal Vlan loopback IP. signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
abdosi
pushed a commit
that referenced
this pull request
May 1, 2020
* [dhcpmon] Filter DHCP O/A Messages of Neighboring Vlans This code fixes a bug where two or more vlans exist. Cross contamination happens for DHCP packets Offer/Ack when received on shared northbound links. The code filters out those packet based on dst IP equal Vlan loopback IP. signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
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.
- Why I did it
This code fixes a bug where two or more vlans exist. Cross contamination
happens for DHCP packets Offer/Ack when received on shared northbound links.
The code filters out those packet based on dst IP equal Vlan loopback IP.
Also, Fixed a bug where libevent event id was being printed instead of signal id.
signed-off-by: Tamer Ahmed tamer.ahmed@microsoft.com
- How to verify it
pytest test_dhcp_relay.py --testbed=testbed --inventory=../ansible/str --testbed_file=../ansible/testbed.csv --host-pattern=all --module-path=../ansible/library
***-Using single Vlan
logs from syslog:
Apr 23 04:52:59.710434 str-s6100-acs-2 NOTICE dhcp_relay#dhcpmon[52]: DHCP Discover rx: 2, tx:96, Offer rx: 2, tx:2, Request rx: 2, tx:96, ACK rx: 2, tx:2
Apr 23 04:54:25.390030 str-s6100-acs-2 NOTICE dhcp_relay#dhcpmon[51]: DHCP Discover rx: 1, tx:48, Offer rx: 1, tx:1, Request rx: 1, tx:48, ACK rx: 1, tx:1
***-Using two vlans:
ansible-playbook config_sonic_basedon_testbed.yml -i str -l str-s6100-acs-2 -e testbed_name=vms7-t0-s6100 --vault-password-file=../.vault-file -e deploy=true -e vlan_config=two_vlan_a
Apr 23 08:05:35.444937 str-s6100-acs-2 ALERT dhcp_relay#dhcpmon[58]: Received signal Terminated
Apr 23 08:05:35.444937 str-s6100-acs-2 NOTICE dhcp_relay#dhcpmon[58]: DHCP Discover rx: 2, tx:96, Offer rx: 2, tx:2, Request rx: 2, tx:96, ACK rx: 2, tx:2
Apr 23 08:05:35.444937 str-s6100-acs-2 ALERT dhcp_relay#dhcpmon[57]: Received signal Terminated
Apr 23 08:05:35.444937 str-s6100-acs-2 NOTICE dhcp_relay#dhcpmon[57]: DHCP Discover rx: 2, tx:96, Offer rx: 2, tx:2, Request rx: 2, tx:96, ACK rx: 2, tx:2
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)