BGP : Fix for nexthop as IPv4 mapped IPv6 address#6821
BGP : Fix for nexthop as IPv4 mapped IPv6 address#6821sworleys merged 1 commit intoFRRouting:masterfrom
Conversation
polychaeta
left a comment
There was a problem hiding this comment.
Thanks for your contribution to FRR!
Click for style suggestions
To apply these suggestions:
curl -s https://gist.githubusercontent.com/polychaeta/bc22ed812fdc0f54732a3d3374e3f621/raw/2a3e1b37d8095f2aa3bd3620e67d960f6011b0bc/cr_6821_1596037947.diff | git apply
diff --git a/bgpd/bgp_updgrp_packet.c b/bgpd/bgp_updgrp_packet.c
index 684b4b7cd..5df9e3f23 100644
--- a/bgpd/bgp_updgrp_packet.c
+++ b/bgpd/bgp_updgrp_packet.c
@@ -577,7 +577,7 @@ struct stream *bpacket_reformat_for_peer(struct bpacket *pkt,
if (IN6_IS_ADDR_UNSPECIFIED(mod_v6nhg)) {
if (peer->nexthop.v4.s_addr) {
ipv4_to_ipv4_mapped_ipv6(mod_v6nhg,
- peer->nexthop.v4);
+ peer->nexthop.v4);
}
}
diff --git a/lib/ipaddr.h b/lib/ipaddr.h
index e26523fdb..5cb9ea562 100644
--- a/lib/ipaddr.h
+++ b/lib/ipaddr.h
@@ -93,12 +93,12 @@ static inline char *ipaddr2str(const struct ipaddr *ip, char *buf, int size)
return buf;
}
-#define IS_MAPPED_IPV6(A) \
- ((A)->s6_addr32[0] == 0x00000000 \
- ? ((A)->s6_addr32[1] == 0x00000000 \
- ? (ntohl((A)->s6_addr32[2]) == 0xFFFF ? 1 : 0) \
- : 0) \
- : 0)
+#define IS_MAPPED_IPV6(A) \
+ ((A)->s6_addr32[0] == 0x00000000 \
+ ? ((A)->s6_addr32[1] == 0x00000000 \
+ ? (ntohl((A)->s6_addr32[2]) == 0xFFFF ? 1 : 0) \
+ : 0) \
+ : 0)
/*
* Convert IPv4 address to IPv4-mapped IPv6 address which is of the
If you are a new contributor to FRR, please see our contributing guidelines.
Outdated results 💚Basic BGPD CI results: SUCCESS, 0 tests failed
For details, please contact louberger |
Outdated results 💚Basic BGPD CI results: SUCCESS, 0 tests failed
For details, please contact louberger |
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopo tests part 0 on Ubuntu 18.04 arm8: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO0U18ARM8-13374/test Topology Tests failed for Topo tests part 0 on Ubuntu 18.04 arm8: see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-13374/artifact/TOPO0U18ARM8/ErrorLog/log_topotests.txt Topo tests part 2 on Ubuntu 18.04 arm8: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO2U18ARM8-13374/test Topology Tests failed for Topo tests part 2 on Ubuntu 18.04 arm8: see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-13374/artifact/TOPO2U18ARM8/ErrorLog/log_topotests.txt Successful on other platforms/tests
Warnings Generated during build:Checkout code: Successful with additional warningsTopo tests part 0 on Ubuntu 18.04 arm8: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO0U18ARM8-13374/test Topology Tests failed for Topo tests part 0 on Ubuntu 18.04 arm8: see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-13374/artifact/TOPO0U18ARM8/ErrorLog/log_topotests.txt Topo tests part 2 on Ubuntu 18.04 arm8: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO2U18ARM8-13374/test Topology Tests failed for Topo tests part 2 on Ubuntu 18.04 arm8: see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-13374/artifact/TOPO2U18ARM8/ErrorLog/log_topotests.txt Warnings Generated during build:Debian 10 amd64 build: Successful with additional warningsDebian Package lintian failed for Debian 10 amd64 build: |
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopo tests part 0 on Ubuntu 18.04 arm8: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO0U18ARM8-13375/test Topology Tests failed for Topo tests part 0 on Ubuntu 18.04 arm8: see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-13375/artifact/TOPO0U18ARM8/ErrorLog/log_topotests.txt Successful on other platforms/tests
Warnings Generated during build:Checkout code: Successful with additional warningsTopo tests part 0 on Ubuntu 18.04 arm8: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO0U18ARM8-13375/test Topology Tests failed for Topo tests part 0 on Ubuntu 18.04 arm8: see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-13375/artifact/TOPO0U18ARM8/ErrorLog/log_topotests.txt Warnings Generated during build:Debian 10 amd64 build: Successful with additional warningsDebian Package lintian failed for Debian 10 amd64 build: |
|
@KaushikNiral you need to fix your commit messages to include the code directory touched the first should be like stated here: http://docs.frrouting.org/projects/dev-guide/en/latest/workflow.html#commit-messages |
c3c1906 to
3bdf24f
Compare
@sworleys , fixed the commit message. Thanks, |
Outdated results 💚Basic BGPD CI results: SUCCESS, 0 tests failed
For details, please contact louberger |
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopo tests part 0 on Ubuntu 18.04 arm8: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO0U18ARM8-13382/test Topology Tests failed for Topo tests part 0 on Ubuntu 18.04 arm8: see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-13382/artifact/TOPO0U18ARM8/ErrorLog/log_topotests.txt Topo tests part 0 on Ubuntu 18.04 amd64: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPOU1804-13382/test Topology Tests failed for Topo tests part 0 on Ubuntu 18.04 amd64: see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-13382/artifact/TOPOU1804/ErrorLog/log_topotests.txt Successful on other platforms/tests
Warnings Generated during build:Checkout code: Successful with additional warningsTopo tests part 0 on Ubuntu 18.04 arm8: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO0U18ARM8-13382/test Topology Tests failed for Topo tests part 0 on Ubuntu 18.04 arm8: see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-13382/artifact/TOPO0U18ARM8/ErrorLog/log_topotests.txt Topo tests part 0 on Ubuntu 18.04 amd64: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPOU1804-13382/test Topology Tests failed for Topo tests part 0 on Ubuntu 18.04 amd64: see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-13382/artifact/TOPOU1804/ErrorLog/log_topotests.txt Warnings Generated during build:Debian 10 amd64 build: Successful with additional warningsDebian Package lintian failed for Debian 10 amd64 build: |
|
@KaushikNiral can you rebase? Hopefully the topotests have been fixed... I dont think they are related to this PR. |
Added a macro to validate the v4 mapped v6 address. Modified bgp receive & send updates for v4 mapped v6 address as nexthop and installing it as recursive nexthop in RIB. Minor change in fpm while sending the routes for nexthop as v4 mapped v6 address. Signed-off-by: Kaushik <kaushik@niralnetworks.com>
3bdf24f to
92d6f76
Compare
@sworleys this is done. |
💚 Basic BGPD CI results: SUCCESS, 0 tests failedResults table
For details, please contact louberger |
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-13458/ This is a comment from an automated CI system. Warnings Generated during build:Checkout code: Successful with additional warningsWarnings Generated during build:Debian 10 amd64 build: Successful with additional warningsDebian Package lintian failed for Debian 10 amd64 build: |
for IPv4 Mapped IPv6 address as nexthop.
in RIB.
nexthop as IPv4 Mapped IPv6 address.
Signed-off-by: Kaushik kaushik@niralnetworks.com