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

bgpd: Fix announce SRv6 locally-generated routes to Zebra #12551

Merged
merged 2 commits into from
Dec 23, 2022

Conversation

proelbtn
Copy link
Contributor

Current bgpd can't announce SRv6 locally-generated routes to Zebra correctly because the MPLS label of locally-generated routes is not valid but sid_info->transposition_len is set to a non-zero value. This commit fixes such kinds of issues.

Before

pe1

pe1# show bgp vrf vrf20 ipv4 unicast 
BGP table version is 1, local router ID is 192.0.2.1, vrf id 4
Default local pref 100, local AS 65001
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

    Network          Next Hop            Metric LocPrf Weight Path
 *> 172.16.0.0/24    0.0.0.0@2<               0         32768 ?

Displayed  1 routes and 1 total paths

pe1# show ip route vrf vrf20

pe1 - bgpd.log

2022/12/20 18:03:10 BGP: [X11WM-VBA5R] bgp_zebra_announce: p=172.16.0.0/24, bgp_is_valid_label: 0
2022/12/20 18:03:10 BGP: [V15FP-4CPVK] Tx route delete VRF 4 172.16.0.0/24 metric 0 tag 0 count 0 nhg 0
2022/12/20 18:03:10 BGP: [JMVGR-VQ1M1] bgp_zebra_announce: 172.16.0.0/24: announcing to zebra (recursion NOT set)

After

pe1

pe1# show bgp vrf vrf20 ipv4 unicast 
BGP table version is 1, local router ID is 192.0.2.1, vrf id 4
Default local pref 100, local AS 65001
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

    Network          Next Hop            Metric LocPrf Weight Path
 *> 172.16.0.0/24    0.0.0.0@2<               0         32768 ?

Displayed  1 routes and 1 total paths

pe1# show ip route vrf vrf20
Codes: K - kernel route, C - connected, S - static, B - BGP,
       T - Table, v - VNC, V - VNC-Direct, D - SHARP,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

VRF vrf20:
B>* 172.16.0.0/24 [20/0] is directly connected, eth0 (vrf vrf10), weight 1, 00:00:42

pe1 - bgpd.log

2022/12/20 18:06:35 BGP: [X11WM-VBA5R] bgp_zebra_announce: p=172.16.0.0/24, bgp_is_valid_label: 0
2022/12/20 18:06:35 BGP: [V15FP-4CPVK] Tx route add VRF 4 172.16.0.0/24 metric 0 tag 0 count 1 nhg 0
2022/12/20 18:06:35 BGP: [JQXM8-V0CKB]   nhop [1]:  if 3 VRF 2 wt 0   
2022/12/20 18:06:35 BGP: [JMVGR-VQ1M1] bgp_zebra_announce: 172.16.0.0/24: announcing to zebra (recursion NOT set)

@frrbot frrbot bot added bgp tests Topotests, make check, etc labels Dec 20, 2022
@ton31337
Copy link
Member

Screenshot-2022-12-20-11:31:30

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Dec 20, 2022

Continuous Integration Result: FAILED

Continuous Integration Result: FAILED

Test incomplete. See below for issues.
CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-8977/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Get source / Pull Request: Successful

Building Stage: Incomplete

Ubuntu 16.04 arm8 build: Incomplete (check logs for details)
Successful on other platforms/tests
  • Ubuntu 18.04 i386 build
  • Debian 11 amd64 build
  • Ubuntu 16.04 i386 build
  • Ubuntu 18.04 amd64 build
  • Ubuntu 16.04 amd64 build
  • Ubuntu 18.04 arm7 build
  • CentOS 7 amd64 build
  • Redhat 8 amd64 build
  • OpenBSD 7 amd64 build
  • FreeBSD 12 amd64 build
  • Fedora 29 amd64 build
  • Ubuntu 18.04 arm8 build
  • Ubuntu 20.04 amd64 build
  • Debian 9 amd64 build
  • Redhat 9 amd64 build
  • Ubuntu 18.04 ppc64le build
  • Debian 10 amd64 build
  • Ubuntu 22.04 amd64 build
  • FreeBSD 11 amd64 build
  • Ubuntu 16.04 arm7 build
### Basic Tests: Incomplete

Ryoga Saito added 2 commits December 20, 2022 20:07
Current bgpd can't annouce SRv6 locally-generated routes to Zebra
correctly because MPLS label of locally-generated routes is not valid
but sid_info->transposition_len is set to non-zero value. This commit
fixes such kind of issues.

Signed-off-by: Ryoga Saito <ryoga.saito@linecorp.com>
To verify previous changes, this PR adds topotest to verify whether
imported routes redistributed will be active on other VRF RIB.

Signed-off-by: Ryoga Saito <ryoga.saito@linecorp.com>
@proelbtn proelbtn force-pushed the fix-install-srv6-local-routes branch from e59a477 to 4d85efb Compare December 20, 2022 11:07
@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-8981/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Copy link
Member

@ton31337 ton31337 left a comment

Choose a reason for hiding this comment

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

LGTM

@ton31337 ton31337 merged commit 8431489 into FRRouting:master Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bgp master size/L tests Topotests, make check, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants