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

pimd: fix recursive lookup for RP #7855

Closed
wants to merge 1 commit into from
Closed

Conversation

patrasar
Copy link
Contributor

Topology:
Client---R1(1.1.1.1)---4link---R2(2.2.2.2)---cisco(3.3.3.3)
3.3.3.3 is RP.
R1(1.1.1.1) is bgp neighbor with R2(2.2.2.2) and configure static
route 2.2.2.2 via 4 links in order to establish the bgp neighborship.
R1 :B> 3.3.3.0/24 [20/0] via 2.2.2.2 (recursive), 00:13:34

  •                 via 20.0.0.2, ens192, 00:13:34
    
  •                 via 30.0.0.2, ens224, 00:13:34
    
  •                 via 40.0.0.2, ens256, 00:13:34
    
  •                 via 50.0.0.2, ens161, 00:13:34
    

Issue:
R1 > rp info incoming interface is ens224 and (*, G ) mroute pointing to ens192
This is not expected.

Root Cause:
In R1, RP(3.3.3.3) is a recursive route. zclient_lookup_nexthop() lookup
for 3.3.3.3 which will give the nexthop as 2.2.2.2 which is a recursive route.
So it will lookup for 2.2.2.2 and will get 4 non-recursive nexthops 20.0.0.2,
30.0.0.2, 40.0.0.2 and 50.0.0.2. Since it is a recursive lookup, 20.0.0.2 is
replaced by 2.2.2.2. The final nexthop we will get as 2.2.2.2, 30.0.0.2, 40.0.0.2
and 50.0.0.2. Since 2.2.2.2(1st nexthop) we dont have any pim neighbor,
30.0.0.2(2nd nexthop) will be choosen as nexthop for route 3.3.3.3 and rp iif
updated as ens224.

Where as pim nexthop cache will have the 3.3.3.3 nexthops as 20.0.0.2, 30.0.0.2,
40.0.0.2, 50.0.0.2. That's why (*,G) mroute iif will be set as ens192(first nexthop).

Fix: zclient_lookup_nexthop() dont replace the first nexthop with the recursive route.

Signed-off-by: Sarita Patra saritap@vmware.com

Topology:
Client---R1(1.1.1.1)---4link---R2(2.2.2.2)---cisco(3.3.3.3)
3.3.3.3 is RP.
R1(1.1.1.1) is bgp neighbor with R2(2.2.2.2) and configure static
route 2.2.2.2 via 4 links in order to establish the bgp neighborship.
R1 :B>  3.3.3.0/24 [20/0] via 2.2.2.2 (recursive), 00:13:34
  *                     via 20.0.0.2, ens192, 00:13:34
  *                     via 30.0.0.2, ens224, 00:13:34
  *                     via 40.0.0.2, ens256, 00:13:34
  *                     via 50.0.0.2, ens161, 00:13:34

Issue:
R1 > rp info incoming interface is ens224 and (*, G ) mroute pointing to ens192
This is not expected.

Root Cause:
In R1, RP(3.3.3.3) is a recursive route. zclient_lookup_nexthop() lookup
for 3.3.3.3 which will give the nexthop as 2.2.2.2 which is a recursive route.
So it will lookup for 2.2.2.2 and will get 4 non-recursive nexthops 20.0.0.2,
30.0.0.2, 40.0.0.2 and 50.0.0.2. Since it is a recursive lookup, 20.0.0.2 is
replaced by 2.2.2.2. The final nexthop we will get as 2.2.2.2, 30.0.0.2, 40.0.0.2
and 50.0.0.2. Since 2.2.2.2(1st nexthop) we dont have any pim neighbor,
30.0.0.2(2nd nexthop) will be choosen as nexthop for route 3.3.3.3 and rp iif
updated as ens224.

Where as pim nexthop cache will have the 3.3.3.3 nexthops as 20.0.0.2, 30.0.0.2,
40.0.0.2, 50.0.0.2. That's why (*,G) mroute iif will be set as ens192(first nexthop).

Fix: zclient_lookup_nexthop() dont replace the first nexthop with the recursive route.

Signed-off-by: Sarita Patra <saritap@vmware.com>
@polychaeta polychaeta added the pim label Jan 12, 2021
@@ -464,14 +455,6 @@ int zclient_lookup_nexthop(struct pim_instance *pim,
.protocol_distance,
nexthop_tab[0].route_metric);
}

Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we delete everything from 441-457 ? This is now dead code and we don't need the debug anymore.

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: FAILED

See below for issues.
CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-16468/

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: Successful

Basic Tests: Failed

Topo tests part 2 on Ubuntu 16.04 amd64: Failed (click for details)

Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TP0U1604AMD64-16468/test

Topology Tests failed for Topo tests part 2 on Ubuntu 16.04 amd64:

2021-01-12 13:18:31,931 ERROR: Traceback (most recent call last):
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP0U1604AMD64/topotests/lib/common_config.py", line 2416, in create_bgp_community_lists
    tgen, router, config_data, "bgp_community_list", build=build
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP0U1604AMD64/topotests/lib/common_config.py", line 289, in create_common_configuration
    load_config_to_router(tgen, router)
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP0U1604AMD64/topotests/lib/common_config.py", line 575, in load_config_to_router
    raise InvalidCLIError("%s" % output)
InvalidCLIError: % Malformed community-list value
line 2: Failure to communicate[13] to bgpd, line: bgp community-list standard ANY permit 0:-1 



2021-01-12 13:18:32,078 ERROR: Traceback (most recent call last):
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP0U1604AMD64/topotests/lib/common_config.py", line 2416, in create_bgp_community_lists
    tgen, router, config_data, "bgp_community_list", build=build
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP0U1604AMD64/topotests/lib/common_config.py", line 289, in create_common_configuration
    load_config_to_router(tgen, router)
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP0U1604AMD64/topotests/lib/common_config.py", line 575, in load_config_to_router
    raise InvalidCLIError("%s" % output)
InvalidCLIError: % Malformed community-list value
line 2: Failure to communicate[13] to bgpd, line: bgp community-list standard ANY permit 0:65536 



2021-01-12 13:18:32,226 ERROR: Traceback (most recent call last):
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP0U1604AMD64/topotests/lib/common_config.py", line 2416, in create_bgp_community_lists
    tgen, router, config_data, "bgp_community_list", build=build
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP0U1604AMD64/topotests/lib/common_config.py", line 289, in create_common_configuration
    load_config_to_router(tgen, router)
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP0U1604AMD64/topotests/lib/common_config.py", line 575, in load_config_to_router
    raise InvalidCLIError("%s" % output)
InvalidCLIError: % Malformed community-list value
line 2: Failure to communicate[13] to bgpd, line: bgp large-community-list standard ANY permit 0:4294967296 



2021-01-12 13:18:32,374 ERROR: Traceback (most recent call last):
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP0U1604AMD64/topotests/lib/common_config.py", line 2416, in create_bgp_community_lists
    tgen, router, config_data, "bgp_community_list", build=build
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP0U1604AMD64/topotests/lib/common_config.py", line 289, in create_common_configuration
    load_config_to_router(tgen, router)
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP0U1604AMD64/topotests/lib/common_config.py", line 575, in load_config_to_router
    raise InvalidCLIError("%s" % output)
InvalidCLIError: % Malformed community-list value
line 2: Failure to communicate[13] to bgpd, line: bgp large-community-list standard ANY permit 0:-1:1 



2021-01-12 13:20:33,670 ERROR: Traceback (most recent call last):
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP0U1604AMD64/topotests/lib/common_config.py", line 2416, in create_bgp_community_lists
    tgen, router, config_data, "bgp_community_list", build=build
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP0U1604AMD64/topotests/lib/common_config.py", line 289, in create_common_configuration
    load_config_to_router(tgen, router)
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP0U1604AMD64/topotests/lib/common_config.py", line 575, in load_config_to_router
    raise InvalidCLIError("%s" % output)
InvalidCLIError: line 2: % Command incomplete[4]: bgp large-community-list standard Test1 permit  



2021-01-12 13:22:02,738 ERROR: r3: bgpd left a dead pidfile (pid=13119)
2021-01-12 13:35:50,088 ERROR: assert failed at "test_bgp_multi_vrf_topo2/test_delete_and_re_add_vrf_p1": Testcase test_delete_and_re_add_vrf_p1 :Failed 
   Error Missing route in RIB of router r2, routes: ['3.1.1.1/32', '3.1.1.2/32']
  
assert "Missing route in RIB of router r2, routes: ['3.1.1.1/32', '3.1.1.2/32']\n" is True
2021-01-12 13:38:55,846 ERROR: r1: bgpd left a dead pidfile (pid=28951)

see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-16468/artifact/TP0U1604AMD64/ErrorLog/log_topotests.txt

Topo tests part 3 on Ubuntu 18.04 arm8: Failed (click for details) Topo tests part 3 on Ubuntu 18.04 arm8: No useful log found
Successful on other platforms/tests
  • Ubuntu 16.04 deb pkg check
  • Debian 10 deb pkg check
  • Topo tests part 2 on Ubuntu 16.04 i386
  • Topo tests part 1 on Ubuntu 16.04 i386
  • Topo tests part 2 on Ubuntu 18.04 arm8
  • Topo tests part 0 on Ubuntu 18.04 amd64
  • Topo tests part 0 on Ubuntu 16.04 i386
  • Topo tests part 2 on Ubuntu 18.04 amd64
  • Topo tests part 3 on Ubuntu 16.04 amd64
  • Topo tests part 4 on Ubuntu 16.04 i386
  • Ubuntu 20.04 deb pkg check
  • Topo tests part 0 on Ubuntu 18.04 arm8
  • Addresssanitizer topotests part 0
  • IPv4 ldp protocol on Ubuntu 18.04
  • Debian 9 deb pkg check
  • Topo tests part 4 on Ubuntu 18.04 arm8
  • Topo tests part 3 on Ubuntu 16.04 i386
  • Topo tests part 1 on Ubuntu 18.04 amd64
  • Ubuntu 18.04 deb pkg check
  • Static analyzer (clang)
  • CentOS 7 rpm pkg check
  • Addresssanitizer topotests part 1
  • IPv6 protocols on Ubuntu 18.04
  • Topo tests part 4 on Ubuntu 16.04 amd64
  • Topo tests part 1 on Ubuntu 16.04 amd64
  • Topo tests part 3 on Ubuntu 18.04 amd64
  • Fedora 29 rpm pkg check
  • Addresssanitizer topotests part 2
  • Debian 8 deb pkg check
  • Topo tests part 4 on Ubuntu 18.04 amd64
  • IPv4 protocols on Ubuntu 18.04
  • Topo tests part 0 on Ubuntu 16.04 amd64
  • Topo tests part 1 on Ubuntu 18.04 arm8

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-16468/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.5.0.3 (current is 4.3.0)
W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.5.0.3 (current is 4.3.0)
W: frr-pythontools: changelog-file-missing-explicit-entry 7.5-0 -> 7.6-dev-20210112-00-gaa9104800-0 (missing) -> 7.6-dev-20210112-00-gaa9104800-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 7.5-0 -> 7.6-dev-20210112-00-gaa9104800-0 (missing) -> 7.6-dev-20210112-00-gaa9104800-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 7.5-0 -> 7.6-dev-20210112-00-gaa9104800-0 (missing) -> 7.6-dev-20210112-00-gaa9104800-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 7.5-0 -> 7.6-dev-20210112-00-gaa9104800-0 (missing) -> 7.6-dev-20210112-00-gaa9104800-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 7.5-0 -> 7.6-dev-20210112-00-gaa9104800-0 (missing) -> 7.6-dev-20210112-00-gaa9104800-0~deb10u1

@LabN-CI
Copy link
Collaborator

LabN-CI commented Jan 12, 2021

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/7855 aa91048
Date 01/12/2021
Start 12:32:42
Finish 13:07:56
Run-Time 35:14
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2021-01-12-12:32:42.txt
Log autoscript-2021-01-12-12:33:40.log.bz2
Memory 500 500 427

For details, please contact louberger

@donaldsharp
Copy link
Member

I believe b59839a fixes this issue

@donaldsharp
Copy link
Member

@polychaeta autoclose in 1 week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants