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

[caclmgrd]Allow Vxlan udp port on receiving vxlan tunnel configuration #50

Merged
merged 4 commits into from
Mar 21, 2023

Conversation

dgsudharsan
Copy link
Contributor

Currently VxLAN packets are dropped due to absence of rule in iptables. When there is L3 traffic on egress VTEP with no ARP entry, due to the absence of processing by kernel, the traffic gets dropped.
Instead the VxLAN packets should be processed and ARP request needs to be resolved by the kernel.

Made changes to allow VxLAN udp port when VxLAN tunnel is configured.

Note: This change doesn't consider the VxLAN_PORT configuration in the switch table. This use case is for the VNET and for EVPN the default value of 4789 is used.

Signed-off-by: dgsudharsan <sudharsand@nvidia.com>
@dgsudharsan
Copy link
Contributor Author

@prsunny @srj102 Can you please review this change?

@prsunny prsunny requested a review from ZhaohuiS March 20, 2023 17:50
@dgsudharsan
Copy link
Contributor Author

The coverage is not met due to the absence of mock for generic swss library components which is missing today. I have added tests to cover the APIs introduced.

scripts/caclmgrd Outdated
iptables_cmds = []

# Add iptables/ip6tables commands to allow VxLAN packets
if ":" in self.VxlanSrcIP:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dgsudharsan Is it better to use this statement to check if it's ipv4 or ipv6?
if isinstance(ip_addr, ipaddress.IPv4Address):

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

scripts/caclmgrd Outdated
iptables_cmds = []

# Remove iptables/ip6tables commands that allow VxLAN packets
if ":" in self.VxlanSrcIP:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dgsudharsan Same comment as previous one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@dgsudharsan dgsudharsan requested a review from ZhaohuiS March 21, 2023 03:16
Copy link
Contributor

@ZhaohuiS ZhaohuiS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@prsunny prsunny merged commit 638d413 into sonic-net:master Mar 21, 2023
@dgsudharsan
Copy link
Contributor Author

@StormLiangMS Can you please create a new 202211 branch for sonic-host-services?

@StormLiangMS
Copy link

@dgsudharsan cherry pick failed, could you submit a separate PR for 202211?

StormLiangMS pushed a commit that referenced this pull request Apr 20, 2023
[caclmgrd]Allow Vxlan udp port on receiving vxlan tunnel configuration
lukasstockner added a commit to genesiscloud/sonic-buildimage that referenced this pull request May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants