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

[BGP]: Convert ip address to network address for the LOCAL_VLAN filter #5832

Merged

Conversation

pavel-shirshov
Copy link
Contributor

@pavel-shirshov pavel-shirshov commented Nov 6, 2020

- Why I did it
To avoid log messages like:

Nov  5 22:12:10.741378 str-s6100-acs-1 INFO bgp#bgpd[55]: Prefix-list LOCAL_VLAN_IPV4_PREFIX prefix changed from 192.168.0.1/21 to 192.168.0.0/21 to match length
Nov  5 22:12:10.741378 str-s6100-acs-1 INFO bgp#bgpd[55]: Prefix-list LOCAL_VLAN_IPV6_PREFIX prefix changed from fc02:1000::1/64 to fc02:1000::/64 to match length

- How I did it
I used jinja2 filter inside of sonic-config-engine to convert ip host address with mask to the ip network address.

- How to verify it
Build an image and run on your DUT.
vtysh -c 'show run' | grep LOCAL_VLAN should show correct output

root@str-s6100-acs-1:~# sonic-cfggen -d -t /usr/share/sonic/templates/bgpd/bgpd.conf.j2 -y /etc/sonic/constants.yml | grep LOCAL_VLAN
ip prefix-list LOCAL_VLAN_IPV4_PREFIX seq 5 permit 192.168.0.0/21
ipv6 prefix-list LOCAL_VLAN_IPV6_PREFIX seq 10 permit fc02:1000::/64

- Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

@pavel-shirshov
Copy link
Contributor Author

retest broadcom please

@pavel-shirshov pavel-shirshov merged commit cdcd20a into sonic-net:master Nov 7, 2020
@abdosi
Copy link
Contributor

abdosi commented Nov 14, 2020

@pavel-shirshov Cherry-pick has conflict. Please create PR for 201911

santhosh-kt pushed a commit to santhosh-kt/sonic-buildimage that referenced this pull request Feb 25, 2021
sonic-net#5832)

* [BGP]: Convert ip address to network address for the LOCAL_VLAN prefix filter
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.

4 participants