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: associate correct nexthop when using peer link-local #8961

Merged

Conversation

pguibert6WIND
Copy link
Member

When setting bgp configuration using peers referencing link local
ipv6 addresses, the bgp should be able to handle incoming bgp
connections, and find out the appropriate interface where the
connection comes from.

ipv6 link local sessions work by using bgp unnumbered interfaces
config, but it does not work if we have a shared media with
multiple potential link local ipv6 addresses on the network.

The fix consists in finding out the appropriate interface, when
the local configuration references a link local ipv6 addresses.

note: this change does not solve the ability for such config to
create an outgoing connection to remote peer (as the link local
ipv6 address config does not indicate which interface to use).

Signed-off-by: Philippe Guibert [email protected]

@LabN-CI
Copy link
Collaborator

LabN-CI commented Jun 30, 2021

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git merge/8961 11632b2
Date 06/30/2021
Start 10:59:40
Finish 11:25:12
Run-Time 25:32
Total 1815
Pass 1815
Fail 0
Valgrind-Errors
Valgrind-Loss
Details vncregress-2021-06-30-10:59:40.txt
Log autoscript-2021-06-30-11:00:57.log.bz2
Memory 514 512 429

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Jun 30, 2021

Continuous Integration Result: FAILED

Continuous Integration Result: FAILED

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

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

Topotests debian 10 amd64 part 5: Failed (click for details)

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

Topology Tests failed for Topotests debian 10 amd64 part 5:

2021-06-30 15:04:44,101 ERROR: assert failed at "test_bgp_recursive_route_ebgp_multi_hop/test_BGP_peering_bw_loopback_and_physical_p1": Testcase test_BGP_peering_bw_loopback_and_physical_p1 : Failed 
   BGP is converged 
   Error: True
assert True is not True

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

Successful on other platforms/tests
  • Topotests Ubuntu 18.04 amd64 part 8
  • Topotests Ubuntu 18.04 amd64 part 9
  • Addresssanitizer topotests part 9
  • Fedora 29 rpm pkg check
  • Topotests Ubuntu 18.04 arm8 part 3
  • Topotests Ubuntu 18.04 i386 part 3
  • Topotests Ubuntu 18.04 i386 part 7
  • Topotests debian 10 amd64 part 1
  • Topotests debian 10 amd64 part 6
  • Addresssanitizer topotests part 4
  • Addresssanitizer topotests part 7
  • Topotests debian 10 amd64 part 0
  • Topotests Ubuntu 18.04 i386 part 8
  • Topotests Ubuntu 18.04 i386 part 2
  • Static analyzer (clang)
  • Topotests Ubuntu 18.04 amd64 part 2
  • Addresssanitizer topotests part 5
  • Topotests Ubuntu 18.04 i386 part 9
  • Topotests Ubuntu 18.04 amd64 part 0
  • Topotests Ubuntu 18.04 i386 part 4
  • Topotests debian 10 amd64 part 2
  • Ubuntu 16.04 deb pkg check
  • Topotests Ubuntu 18.04 amd64 part 6
  • Topotests Ubuntu 18.04 arm8 part 5
  • Topotests Ubuntu 18.04 arm8 part 0
  • Topotests Ubuntu 18.04 i386 part 6
  • Addresssanitizer topotests part 0
  • Ubuntu 18.04 deb pkg check
  • Topotests Ubuntu 18.04 amd64 part 1
  • Topotests debian 10 amd64 part 4
  • CentOS 7 rpm pkg check
  • Topotests debian 10 amd64 part 8
  • IPv6 protocols on Ubuntu 18.04
  • Topotests debian 10 amd64 part 3
  • Topotests Ubuntu 18.04 amd64 part 3
  • Topotests Ubuntu 18.04 amd64 part 5
  • Addresssanitizer topotests part 1
  • Topotests Ubuntu 18.04 arm8 part 8
  • Topotests Ubuntu 18.04 i386 part 1
  • Topotests Ubuntu 18.04 amd64 part 4
  • Topotests Ubuntu 18.04 arm8 part 6
  • Topotests debian 10 amd64 part 7
  • IPv4 protocols on Ubuntu 18.04
  • Addresssanitizer topotests part 8
  • Topotests Ubuntu 18.04 arm8 part 1
  • Addresssanitizer topotests part 3
  • Topotests Ubuntu 18.04 amd64 part 7
  • Topotests Ubuntu 18.04 arm8 part 2
  • Topotests Ubuntu 18.04 arm8 part 7
  • Addresssanitizer topotests part 6
  • IPv4 ldp protocol on Ubuntu 18.04
  • Addresssanitizer topotests part 2
  • Ubuntu 20.04 deb pkg check
  • Topotests Ubuntu 18.04 arm8 part 9
  • Topotests Ubuntu 18.04 i386 part 0
  • Topotests debian 10 amd64 part 9
  • Topotests Ubuntu 18.04 i386 part 5
  • Debian 9 deb pkg check
  • Topotests Ubuntu 18.04 arm8 part 4
  • Debian 10 deb pkg check

Warnings Generated during build:

Checkout code: Successful with additional warnings
Topotests debian 10 amd64 part 5: Failed (click for details)

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

Topology Tests failed for Topotests debian 10 amd64 part 5:

2021-06-30 15:04:44,101 ERROR: assert failed at "test_bgp_recursive_route_ebgp_multi_hop/test_BGP_peering_bw_loopback_and_physical_p1": Testcase test_BGP_peering_bw_loopback_and_physical_p1 : Failed 
   BGP is converged 
   Error: True
assert True is not True

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

Report for bgp_zebra.c | 6 issues
===============================================
< WARNING: line over 80 characters
< #756: FILE: /tmp/f1-21724/bgp_zebra.c:756:
< WARNING: line over 80 characters
< #757: FILE: /tmp/f1-21724/bgp_zebra.c:757:
< WARNING: line over 80 characters
< #758: FILE: /tmp/f1-21724/bgp_zebra.c:758:

@pguibert6WIND pguibert6WIND force-pushed the bgp_unnumbered_config_find_nexthop branch from 11632b2 to f89071e Compare July 1, 2021 09:17
@polychaeta polychaeta added the bgp label Jul 1, 2021
Copy link

@polychaeta polychaeta left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution to FRR!

Click for style suggestions

To apply these suggestions:

curl -s https://gist.githubusercontent.com/polychaeta/17990dab281e906f320ec956b85aed3d/raw/3ac068b72d433f6b851b4e008edae1ee98690492/cr_8961_1625131040.diff | git apply

diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index fd46ac564..8156e2e9b 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -753,9 +753,10 @@ bool bgp_zebra_nexthop_set(union sockunion *local, union sockunion *remote,
 				ifp = if_lookup_by_name(peer->update_if,
 							peer->bgp->vrf_id);
 			else
-				ifp = if_lookup_by_ipv6_exact(&local->sin6.sin6_addr,
-							      local->sin6.sin6_scope_id,
-							      peer->bgp->vrf_id);
+				ifp = if_lookup_by_ipv6_exact(
+					&local->sin6.sin6_addr,
+					local->sin6.sin6_scope_id,
+					peer->bgp->vrf_id);
 		} else if (peer->update_if)
 			ifp = if_lookup_by_name(peer->update_if,
 						peer->bgp->vrf_id);

If you are a new contributor to FRR, please see our contributing guidelines.

After making changes, you do not need to create a new PR. You should perform an amend or interactive rebase followed by a force push.

@LabN-CI
Copy link
Collaborator

LabN-CI commented Jul 1, 2021

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git merge/8961 f89071e
Date 07/01/2021
Start 06:02:07
Finish 06:27:34
Run-Time 25:27
Total 1815
Pass 1815
Fail 0
Valgrind-Errors
Valgrind-Loss
Details vncregress-2021-07-01-06:02:07.txt
Log autoscript-2021-07-01-06:03:17.log.bz2
Memory 495 509 430

For details, please contact louberger

@pguibert6WIND pguibert6WIND force-pushed the bgp_unnumbered_config_find_nexthop branch from f89071e to 386dd18 Compare July 1, 2021 12:53
@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Jul 1, 2021

Continuous Integration Result: SUCCESSFUL

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-FRRPULLREQ-19986/

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.

Warnings Generated during build:

Checkout code: Successful with additional warnings
Report for bgp_zebra.c | 6 issues
===============================================
< WARNING: line over 80 characters
< #756: FILE: /tmp/f1-19682/bgp_zebra.c:756:
< WARNING: line over 80 characters
< #757: FILE: /tmp/f1-19682/bgp_zebra.c:757:
< WARNING: line over 80 characters
< #758: FILE: /tmp/f1-19682/bgp_zebra.c:758:

@LabN-CI
Copy link
Collaborator

LabN-CI commented Jul 1, 2021

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git merge/8961 386dd18
Date 07/01/2021
Start 09:42:07
Finish 10:07:43
Run-Time 25:36
Total 1815
Pass 1815
Fail 0
Valgrind-Errors
Valgrind-Loss
Details vncregress-2021-07-01-09:42:07.txt
Log autoscript-2021-07-01-09:43:17.log.bz2
Memory 483 516 425

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Jul 1, 2021

Continuous Integration Result: FAILED

Continuous Integration Result: FAILED

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

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

Topotests Ubuntu 18.04 amd64 part 4: Failed (click for details)

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

Topology Tests failed for Topotests Ubuntu 18.04 amd64 part 4:

2021-07-01 14:40:39,557 ERROR: 'router_json_cmp' failed after 136.33 seconds
2021-07-01 14:40:39,559 ERROR: assert failed at "bgp_ipv6_rtadv.test_bgp_ipv6_rtadv/test_protocols_convergence": "r2" JSON output mismatches
assert Generated JSON diff error report:
  
  > $: d2 has key '10.254.254.1/32' which is not present in d1
2021-07-01 14:44:39,881 ERROR: Traceback (most recent call last):
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP4U1804AMD64/topotests/lib/common_config.py", line 2567, 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-TP4U1804AMD64/topotests/lib/common_config.py", line 363, in create_common_configuration
    load_config_to_router(tgen, router)
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP4U1804AMD64/topotests/lib/common_config.py", line 617, 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-07-01 14:44:40,227 ERROR: Traceback (most recent call last):
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP4U1804AMD64/topotests/lib/common_config.py", line 2567, 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-TP4U1804AMD64/topotests/lib/common_config.py", line 363, in create_common_configuration
    load_config_to_router(tgen, router)
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP4U1804AMD64/topotests/lib/common_config.py", line 617, 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-07-01 14:44:40,597 ERROR: Traceback (most recent call last):
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP4U1804AMD64/topotests/lib/common_config.py", line 2567, 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-TP4U1804AMD64/topotests/lib/common_config.py", line 363, in create_common_configuration
    load_config_to_router(tgen, router)
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP4U1804AMD64/topotests/lib/common_config.py", line 617, 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-07-01 14:44:40,953 ERROR: Traceback (most recent call last):
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP4U1804AMD64/topotests/lib/common_config.py", line 2567, 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-TP4U1804AMD64/topotests/lib/common_config.py", line 363, in create_common_configuration
    load_config_to_router(tgen, router)
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP4U1804AMD64/topotests/lib/common_config.py", line 617, 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-07-01 14:44:42,989 ERROR: Traceback (most recent call last):
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP4U1804AMD64/topotests/lib/common_config.py", line 2567, 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-TP4U1804AMD64/topotests/lib/common_config.py", line 363, in create_common_configuration
    load_config_to_router(tgen, router)
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP4U1804AMD64/topotests/lib/common_config.py", line 617, 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 1:a:2 



2021-07-01 14:48:18,148 ERROR: Traceback (most recent call last):
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP4U1804AMD64/topotests/lib/common_config.py", line 2567, 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-TP4U1804AMD64/topotests/lib/common_config.py", line 363, in create_common_configuration
    load_config_to_router(tgen, router)
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP4U1804AMD64/topotests/lib/common_config.py", line 617, in load_config_to_router
    raise InvalidCLIError("%s" % output)
InvalidCLIError: line 2: % Command incomplete[4]: bgp large-community-list standard Test1 permit  



2021-07-01 14:51:52,332 ERROR: R3: bgpd left a dead pidfile (pid=29230)

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

Successful on other platforms/tests
  • Static analyzer (clang)
  • Addresssanitizer topotests part 5
  • Topotests Ubuntu 18.04 amd64 part 7
  • Topotests Ubuntu 18.04 i386 part 9
  • Topotests Ubuntu 18.04 amd64 part 0
  • Topotests Ubuntu 18.04 i386 part 4
  • Topotests Ubuntu 18.04 arm8 part 5
  • Topotests Ubuntu 18.04 arm8 part 0
  • Addresssanitizer topotests part 0
  • IPv4 ldp protocol on Ubuntu 18.04
  • Topotests Ubuntu 18.04 arm8 part 9
  • Topotests Ubuntu 18.04 i386 part 0
  • Topotests debian 10 amd64 part 9
  • Topotests Ubuntu 18.04 i386 part 5
  • Topotests debian 10 amd64 part 4
  • Topotests Ubuntu 18.04 arm8 part 4
  • Topotests debian 10 amd64 part 8
  • Topotests Ubuntu 18.04 amd64 part 9
  • IPv6 protocols on Ubuntu 18.04
  • Fedora 29 rpm pkg check
  • Topotests Ubuntu 18.04 arm8 part 3
  • Topotests Ubuntu 18.04 amd64 part 3
  • Topotests Ubuntu 18.04 amd64 part 5
  • Addresssanitizer topotests part 1
  • Topotests debian 10 amd64 part 5
  • Topotests Ubuntu 18.04 i386 part 7
  • Topotests debian 10 amd64 part 6
  • Addresssanitizer topotests part 4
  • Topotests Ubuntu 18.04 arm8 part 6
  • Topotests debian 10 amd64 part 7
  • IPv4 protocols on Ubuntu 18.04
  • Addresssanitizer topotests part 8
  • Topotests Ubuntu 18.04 arm8 part 1
  • Topotests Ubuntu 18.04 i386 part 2
  • Topotests Ubuntu 18.04 amd64 part 2
  • Topotests Ubuntu 18.04 arm8 part 2
  • Topotests Ubuntu 18.04 arm8 part 7
  • Topotests debian 10 amd64 part 2
  • Ubuntu 16.04 deb pkg check
  • Addresssanitizer topotests part 6
  • Topotests Ubuntu 18.04 amd64 part 6
  • Topotests Ubuntu 18.04 i386 part 6
  • Addresssanitizer topotests part 2
  • Ubuntu 18.04 deb pkg check
  • Topotests Ubuntu 18.04 amd64 part 1
  • Ubuntu 20.04 deb pkg check
  • Debian 9 deb pkg check
  • Debian 10 deb pkg check
  • CentOS 7 rpm pkg check
  • Topotests Ubuntu 18.04 amd64 part 8
  • Topotests debian 10 amd64 part 3
  • Addresssanitizer topotests part 9
  • Topotests Ubuntu 18.04 i386 part 3
  • Topotests Ubuntu 18.04 arm8 part 8
  • Topotests Ubuntu 18.04 i386 part 1
  • Topotests debian 10 amd64 part 1
  • Addresssanitizer topotests part 7
  • Topotests debian 10 amd64 part 0
  • Topotests Ubuntu 18.04 i386 part 8
  • Addresssanitizer topotests part 3

@pguibert6WIND pguibert6WIND force-pushed the bgp_unnumbered_config_find_nexthop branch from 386dd18 to 57e0f76 Compare July 1, 2021 18:07
@LabN-CI
Copy link
Collaborator

LabN-CI commented Jul 1, 2021

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git merge/8961 57e0f76
Date 07/01/2021
Start 14:10:49
Finish 14:36:24
Run-Time 25:35
Total 1815
Pass 1815
Fail 0
Valgrind-Errors
Valgrind-Loss
Details vncregress-2021-07-01-14:10:49.txt
Log autoscript-2021-07-01-14:12:04.log.bz2
Memory 513 498 430

For details, please contact louberger

@pguibert6WIND pguibert6WIND force-pushed the bgp_unnumbered_config_find_nexthop branch from 57e0f76 to 1601fd0 Compare July 2, 2021 13:31
@LabN-CI
Copy link
Collaborator

LabN-CI commented Jul 2, 2021

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git merge/8961 1601fd0
Date 07/02/2021
Start 10:07:31
Finish 10:33:06
Run-Time 25:35
Total 1815
Pass 1815
Fail 0
Valgrind-Errors
Valgrind-Loss
Details vncregress-2021-07-02-10:07:31.txt
Log autoscript-2021-07-02-10:08:47.log.bz2
Memory 509 502 430

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Jul 2, 2021

Continuous Integration Result: FAILED

Continuous Integration Result: FAILED

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

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

Topotests Ubuntu 18.04 i386 part 5: Incomplete (check logs for details)
Topotests Ubuntu 18.04 i386 part 5: Incomplete (check logs for details)
Topotests Ubuntu 18.04 i386 part 8: Incomplete (check logs for details)
Topotests Ubuntu 18.04 i386 part 5: Incomplete (check logs for details)
Topotests Ubuntu 18.04 i386 part 5: Incomplete (check logs for details)
Topotests Ubuntu 18.04 i386 part 8: Incomplete (check logs for details)
Addresssanitizer topotests part 4: Incomplete (check logs for details)
Successful on other platforms/tests
  • IPv6 protocols on Ubuntu 18.04
  • Addresssanitizer topotests part 3
  • Addresssanitizer topotests part 1
  • Topotests debian 10 amd64 part 8
  • Topotests Ubuntu 18.04 amd64 part 3
  • Topotests Ubuntu 18.04 amd64 part 5
  • IPv4 protocols on Ubuntu 18.04
  • Addresssanitizer topotests part 8
  • Topotests Ubuntu 18.04 arm8 part 6
  • Topotests Ubuntu 18.04 arm8 part 1
  • Topotests Ubuntu 18.04 amd64 part 0
  • Topotests Ubuntu 18.04 amd64 part 4
  • Addresssanitizer topotests part 6
  • Topotests Ubuntu 18.04 arm8 part 9
  • Topotests debian 10 amd64 part 7
  • Debian 10 deb pkg check
  • Topotests Ubuntu 18.04 amd64 part 7
  • Debian 9 deb pkg check
  • Fedora 29 rpm pkg check
  • IPv4 ldp protocol on Ubuntu 18.04
  • Topotests Ubuntu 18.04 arm8 part 4
  • Topotests debian 10 amd64 part 9
  • Ubuntu 20.04 deb pkg check
  • Topotests Ubuntu 18.04 i386 part 0
  • CentOS 7 rpm pkg check
  • Topotests Ubuntu 18.04 amd64 part 8
  • Topotests Ubuntu 18.04 amd64 part 9
  • Addresssanitizer topotests part 2
  • Topotests Ubuntu 18.04 arm8 part 3
  • Topotests debian 10 amd64 part 5
  • Topotests debian 10 amd64 part 0
  • Topotests Ubuntu 18.04 i386 part 3
  • Topotests Ubuntu 18.04 i386 part 7
  • Topotests Ubuntu 18.04 i386 part 2
  • Topotests debian 10 amd64 part 1
  • Topotests debian 10 amd64 part 6
  • Topotests Ubuntu 18.04 arm8 part 7
  • Topotests Ubuntu 18.04 arm8 part 2
  • Addresssanitizer topotests part 9
  • Topotests debian 10 amd64 part 2
  • Ubuntu 16.04 deb pkg check
  • Topotests Ubuntu 18.04 amd64 part 2
  • Topotests Ubuntu 18.04 i386 part 6
  • Topotests Ubuntu 18.04 i386 part 4
  • Addresssanitizer topotests part 7
  • Topotests Ubuntu 18.04 i386 part 1
  • Topotests Ubuntu 18.04 arm8 part 8
  • Topotests Ubuntu 18.04 i386 part 9
  • Topotests Ubuntu 18.04 arm8 part 0
  • Topotests Ubuntu 18.04 amd64 part 6
  • Topotests Ubuntu 18.04 arm8 part 5
  • Topotests debian 10 amd64 part 4
  • Addresssanitizer topotests part 0
  • Addresssanitizer topotests part 5
  • Static analyzer (clang)
  • Topotests debian 10 amd64 part 3
  • Ubuntu 18.04 deb pkg check
  • Topotests Ubuntu 18.04 amd64 part 1

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Jul 2, 2021

Continuous Integration Result: SUCCESSFUL

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-FRRPULLREQ-20019/

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.

@@ -750,6 +750,14 @@ bool bgp_zebra_nexthop_set(union sockunion *local, union sockunion *remote,
? peer->conf_if
: peer->ifname,
peer->bgp->vrf_id);
else if (peer->update_if)
Copy link
Member

Choose a reason for hiding this comment

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

Is this a valid case for LL peering?

Copy link
Member Author

Choose a reason for hiding this comment

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

as per Donald remark, this should be a valid case, only if update-source command is used.

Copy link
Member

@donaldsharp donaldsharp left a comment

Choose a reason for hiding this comment

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

looking up the correct interface for the LL if you have the peer->update_if is all that we can do here.

bgpd/bgp_zebra.c Outdated
ifp = if_lookup_by_name(peer->update_if,
peer->bgp->vrf_id);
else
ifp = if_lookup_by_ipv6_exact(
Copy link
Member

Choose a reason for hiding this comment

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

I'm ok with getting the correct interface from the peer->update_if as that is associated with the update-source cli but given the way LL works in v6 world doing a if_lookup_by_ipv6_exact will more than likely not return the correct interface here and will lead to weird issues and this else statement should be removed.

Copy link
Member Author

Choose a reason for hiding this comment

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

ok. removed call to ipv6_exact, and kept the check with update-source command.

Copy link
Member Author

Choose a reason for hiding this comment

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

@donaldsharp , please review

When setting bgp configuration using peers referencing link local
ipv6 addresses, the bgp should be able to handle incoming bgp
connections, and find out the appropriate interface where the
connection comes from.

ipv6 link local sessions work by using bgp unnumbered interfaces
config, but it does not work if we have a shared media with
multiple potential link local ipv6 addresses on the network.

The fix consists in finding out the appropriate interface, when
the local configuration references a link local ipv6 addresses,
and the source address used references an interface. below
configuration illustrates what can be done then:

neighbor fe80::4113:5bba:2b61:b20c remote-as 55
neighbor fe80::4113:5bba:2b61:b20c update-source eth0

note: this change does not solve the ability for such config to
create an outgoing connection to remote peer (as the link local
ipv6 address config does not indicate which interface to use).

Signed-off-by: Philippe Guibert <[email protected]>
@pguibert6WIND pguibert6WIND force-pushed the bgp_unnumbered_config_find_nexthop branch from 1601fd0 to abe6805 Compare July 12, 2021 07:23
@LabN-CI
Copy link
Collaborator

LabN-CI commented Jul 12, 2021

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/8961 abe6805
Date 07/12/2021
Start 03:45:47
Finish 04:11:11
Run-Time 25:24
Total 1815
Pass 1815
Fail 0
Valgrind-Errors
Valgrind-Loss
Details vncregress-2021-07-12-03:45:47.txt
Log autoscript-2021-07-12-03:47:02.log.bz2
Memory 517 505 424

For details, please contact louberger

@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-FRRPULLREQ-20175/

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.

@ton31337 ton31337 requested a review from donaldsharp July 13, 2021 13:31
@donaldsharp donaldsharp merged commit 4c91056 into FRRouting:master Jul 13, 2021
@idryzhov
Copy link
Contributor

@Mergifyio backport stable/8.0

@mergify
Copy link

mergify bot commented Jul 23, 2021

Command backport stable/8.0: success

Backports have been created

donaldsharp added a commit that referenced this pull request Jul 23, 2021
bgpd: associate correct nexthop when using peer link-local (backport #8961)
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.

7 participants