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: Enforce self-next-hop check in next-hop update. #6191

Merged
merged 1 commit into from
Apr 21, 2020

Conversation

NaveenThanikachalam
Copy link
Contributor

Problem Description:

+--+                                            +--+
|R1|-(192.201.202.1)----iBGP----(192.201.202.2)-|R2|
+--+                                            +--+

Routes on R2:
S>* 202.202.202.202/32 [1/0] via 192.201.78.1, ens256, 00:40:48
Where, the next-hop network, 192.201.78.0/24, is a directly connected network address.
C>* 192.201.78.0/24 is directly connected, ens256, 00:40:48

Configurations on R1:

!
router bgp 201
 bgp router-id 192.168.0.1
 neighbor 192.201.202.2 remote-as 201
!

Configurations on R2:

!
ip route 202.202.202.202/32 192.201.78.1
!
router bgp 201
 bgp router-id 192.168.0.2
 neighbor 192.201.202.1 remote-as 201
 !
 address-family ipv4 unicast
  redistribute static
 exit-address-family
!

Step-1:
R1 receives the route 202.202.202.202/32 from R2.
R1 installs the route in its BGP RIB.

Step-2:
On R1, a connected interface address is added. The address is the same as the next-hop of the BGP route received from R2 (192.201.78.1).

Point of Failure:
R1 resolves the BGP route even though the route's next-hop is its own connected address.
Even though this appears to be a misconfiguration it would still be better to safeguard the code against it.

Fix:
When BGP receives a connected route from Zebra, it processes the
routes for the next-hop update.
While doing so, BGP must ignore routes whose next-hop address matches
the address of the connected route for which Zebra sent the next-hop update
message.

Signed-off-by: NaveenThanikachalam nthanikachal@vmware.com

@polychaeta polychaeta added the bgp label Apr 9, 2020
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/a7fd4b2934bb7b6d6fa018d51b3988ac/raw/58bfc1fd06fdbb575c17e2de6bab548d873dc49e/cr_6191_1586418055.diff | git apply

diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c
index a4dfc0c8e..6ed2b63b5 100644
--- a/bgpd/bgp_nht.c
+++ b/bgpd/bgp_nht.c
@@ -745,12 +745,12 @@ static void evaluate_paths(struct bgp_nexthop_cache *bnc)
 			bnc_is_valid_nexthop =
 				bgp_isvalid_labeled_nexthop(bnc) ? 1 : 0;
 		} else {
-			if (bgp_update_martian_nexthop(bnc->bgp, afi, safi,
-						       path->type,
-						       path->sub_type,
-						       path->attr, rn)) {
-				zlog_debug("Prefix %pRN, ignoring path due to martian or self-next-hop",
-					   rn);
+			if (bgp_update_martian_nexthop(
+				    bnc->bgp, afi, safi, path->type,
+				    path->sub_type, path->attr, rn)) {
+				zlog_debug(
+					"Prefix %pRN, ignoring path due to martian or self-next-hop",
+					rn);
 			} else {
 				bnc_is_valid_nexthop =
 					bgp_isvalid_nexthop(bnc) ? 1 : 0;

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

@LabN-CI
Copy link
Collaborator

LabN-CI commented Apr 9, 2020

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git merge/6191 c290173
Date 04/09/2020
Start 03:45:49
Finish 04:11:49
Run-Time 26:00
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2020-04-09-03:45:49.txt
Log autoscript-2020-04-09-03:46:49.log.bz2
Memory 498 495 426

For details, please contact louberger

@LabN-CI
Copy link
Collaborator

LabN-CI commented Apr 9, 2020

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git merge/6191 611042a
Date 04/09/2020
Start 04:15:45
Finish 04:41:41
Run-Time 25:56
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2020-04-09-04:15:45.txt
Log autoscript-2020-04-09-04:16:43.log.bz2
Memory 477 495 424

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Apr 9, 2020

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-11749/

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:

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-11749/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: pkg-js-tools-test-is-missing
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200409-00-gc29017392-0 (missing) -> 7.4-dev-20200409-00-gc29017392-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200409-00-gc29017392-0 (missing) -> 7.4-dev-20200409-00-gc29017392-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200409-00-gc29017392-0 (missing) -> 7.4-dev-20200409-00-gc29017392-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200409-00-gc29017392-0 (missing) -> 7.4-dev-20200409-00-gc29017392-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200409-00-gc29017392-0 (missing) -> 7.4-dev-20200409-00-gc29017392-0~deb10u1

CLANG Static Analyzer Summary

  • Github Pull Request 6191, comparing to Git base SHA 2ee1e4b
  • Base image data for Git 2ee1e4b does not exist - compare skipped

1 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11749/artifact/shared/static_analysis/index.html

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Apr 9, 2020

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-11750/

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:

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-11750/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: pkg-js-tools-test-is-missing
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200409-00-g611042a90-0 (missing) -> 7.4-dev-20200409-00-g611042a90-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200409-00-g611042a90-0 (missing) -> 7.4-dev-20200409-00-g611042a90-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200409-00-g611042a90-0 (missing) -> 7.4-dev-20200409-00-g611042a90-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200409-00-g611042a90-0 (missing) -> 7.4-dev-20200409-00-g611042a90-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200409-00-g611042a90-0 (missing) -> 7.4-dev-20200409-00-g611042a90-0~deb10u1

CLANG Static Analyzer Summary

  • Github Pull Request 6191, comparing to Git base SHA 2ee1e4b
  • Base image data for Git 2ee1e4b does not exist - compare skipped

1 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11750/artifact/shared/static_analysis/index.html

bgpd/bgp_nht.c Outdated Show resolved Hide resolved
@donaldsharp
Copy link
Member

Why is the commit message so radically different than the comment that came with the commit above? Why wouldn't we want this discussion in the commit message?

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!

  • One of your commits has a missing or badly formatted Signed-off-by line; we can't accept your contribution until all of your commits have one
Click for style suggestions

To apply these suggestions:

curl -s https://gist.githubusercontent.com/polychaeta/79943933562db58198d0d61c2a1f8926/raw/a6142e1c0dd7f57852934d3d45033feab61e32ba/cr_6191_1586487385.diff | git apply

diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c
index ab6596b29..baf4e5796 100644
--- a/bgpd/bgp_nht.c
+++ b/bgpd/bgp_nht.c
@@ -750,8 +750,8 @@ static void evaluate_paths(struct bgp_nexthop_cache *bnc)
 				    path->sub_type, path->attr, rn)) {
 				if (BGP_DEBUG(nht, NHT))
 					zlog_debug(
-					"%s: Prefix %pRN (vrf %s), ignoring path due to martian or self-next-hop",
-					__func__, rn, bgp_path->name);
+						"%s: Prefix %pRN (vrf %s), ignoring path due to martian or self-next-hop",
+						__func__, rn, bgp_path->name);
 			} else {
 				bnc_is_valid_nexthop =
 					bgp_isvalid_nexthop(bnc) ? 1 : 0;

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

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!

  • One of your commits has a missing or badly formatted Signed-off-by line; we can't accept your contribution until all of your commits have one
Click for style suggestions

To apply these suggestions:

curl -s https://gist.githubusercontent.com/polychaeta/fc576456fb5c9bfaec071e24e7979bbc/raw/a6142e1c0dd7f57852934d3d45033feab61e32ba/cr_6191_1586487460.diff | git apply

diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c
index ab6596b29..baf4e5796 100644
--- a/bgpd/bgp_nht.c
+++ b/bgpd/bgp_nht.c
@@ -750,8 +750,8 @@ static void evaluate_paths(struct bgp_nexthop_cache *bnc)
 				    path->sub_type, path->attr, rn)) {
 				if (BGP_DEBUG(nht, NHT))
 					zlog_debug(
-					"%s: Prefix %pRN (vrf %s), ignoring path due to martian or self-next-hop",
-					__func__, rn, bgp_path->name);
+						"%s: Prefix %pRN (vrf %s), ignoring path due to martian or self-next-hop",
+						__func__, rn, bgp_path->name);
 			} else {
 				bnc_is_valid_nexthop =
 					bgp_isvalid_nexthop(bnc) ? 1 : 0;

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

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!

  • One of your commits has a missing or badly formatted Signed-off-by line; we can't accept your contribution until all of your commits have one

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

@polychaeta polychaeta dismissed stale reviews from themself April 10, 2020 03:01

blocking comments addressed

@NaveenThanikachalam
Copy link
Contributor Author

Why is the commit message so radically different than the comment that came with the commit above? Why wouldn't we want this discussion in the commit message?

Thanks, @donaldsharp. I thought I'd keep the commit message crisp.
I updated it now to capture all the details.
I kindly request you to have a look now.

@LabN-CI
Copy link
Collaborator

LabN-CI commented Apr 10, 2020

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git merge/6191 be18a0f
Date 04/09/2020
Start 23:00:46
Finish 23:26:42
Run-Time 25:56
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2020-04-09-23:00:46.txt
Log autoscript-2020-04-09-23:01:41.log.bz2
Memory 496 487 425

For details, please contact louberger

@LabN-CI
Copy link
Collaborator

LabN-CI commented Apr 10, 2020

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git merge/6191 d995b65
Date 04/09/2020
Start 23:30:44
Finish 23:56:52
Run-Time 26:08
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2020-04-09-23:30:44.txt
Log autoscript-2020-04-09-23:31:41.log.bz2
Memory 493 467 429

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Apr 10, 2020

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-11771/

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:

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-11771/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: pkg-js-tools-test-is-missing
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-g431d7c351-0 (missing) -> 7.4-dev-20200410-00-g431d7c351-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-g431d7c351-0 (missing) -> 7.4-dev-20200410-00-g431d7c351-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-g431d7c351-0 (missing) -> 7.4-dev-20200410-00-g431d7c351-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-g431d7c351-0 (missing) -> 7.4-dev-20200410-00-g431d7c351-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-g431d7c351-0 (missing) -> 7.4-dev-20200410-00-g431d7c351-0~deb10u1

CLANG Static Analyzer Summary

  • Github Pull Request 6191, comparing to Git base SHA 43086e6
  • Base image data for Git 43086e6 does not exist - compare skipped

1 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11771/artifact/shared/static_analysis/index.html

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Apr 10, 2020

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-11770/

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:

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-11770/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: pkg-js-tools-test-is-missing
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-g233fae507-0 (missing) -> 7.4-dev-20200410-00-g233fae507-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-g233fae507-0 (missing) -> 7.4-dev-20200410-00-g233fae507-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-g233fae507-0 (missing) -> 7.4-dev-20200410-00-g233fae507-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-g233fae507-0 (missing) -> 7.4-dev-20200410-00-g233fae507-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-g233fae507-0 (missing) -> 7.4-dev-20200410-00-g233fae507-0~deb10u1

CLANG Static Analyzer Summary

  • Github Pull Request 6191, comparing to Git base SHA 43086e6
  • Base image data for Git 43086e6 does not exist - compare skipped

1 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11770/artifact/shared/static_analysis/index.html

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Apr 10, 2020

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-11772/

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:

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-11772/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: pkg-js-tools-test-is-missing
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-gbe18a0fef-0 (missing) -> 7.4-dev-20200410-00-gbe18a0fef-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-gbe18a0fef-0 (missing) -> 7.4-dev-20200410-00-gbe18a0fef-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-gbe18a0fef-0 (missing) -> 7.4-dev-20200410-00-gbe18a0fef-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-gbe18a0fef-0 (missing) -> 7.4-dev-20200410-00-gbe18a0fef-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-gbe18a0fef-0 (missing) -> 7.4-dev-20200410-00-gbe18a0fef-0~deb10u1

CLANG Static Analyzer Summary

  • Github Pull Request 6191, comparing to Git base SHA 43086e6
  • Base image data for Git 43086e6 does not exist - compare skipped

1 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11772/artifact/shared/static_analysis/index.html

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Apr 10, 2020

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-11773/

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:

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-11773/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: pkg-js-tools-test-is-missing
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-gd995b6531-0 (missing) -> 7.4-dev-20200410-00-gd995b6531-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-gd995b6531-0 (missing) -> 7.4-dev-20200410-00-gd995b6531-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-gd995b6531-0 (missing) -> 7.4-dev-20200410-00-gd995b6531-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-gd995b6531-0 (missing) -> 7.4-dev-20200410-00-gd995b6531-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-gd995b6531-0 (missing) -> 7.4-dev-20200410-00-gd995b6531-0~deb10u1

CLANG Static Analyzer Summary

  • Github Pull Request 6191, comparing to Git base SHA 43086e6
  • Base image data for Git 43086e6 does not exist - compare skipped

1 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11773/artifact/shared/static_analysis/index.html

@LabN-CI
Copy link
Collaborator

LabN-CI commented Apr 10, 2020

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git merge/6191 1e4b59c
Date 04/10/2020
Start 01:25:44
Finish 01:51:44
Run-Time 26:00
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2020-04-10-01:25:44.txt
Log autoscript-2020-04-10-01:26:44.log.bz2
Memory 488 466 425

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Apr 10, 2020

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-11774/

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:

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-11774/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: pkg-js-tools-test-is-missing
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-g1e4b59c9f-0 (missing) -> 7.4-dev-20200410-00-g1e4b59c9f-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-g1e4b59c9f-0 (missing) -> 7.4-dev-20200410-00-g1e4b59c9f-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-g1e4b59c9f-0 (missing) -> 7.4-dev-20200410-00-g1e4b59c9f-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-g1e4b59c9f-0 (missing) -> 7.4-dev-20200410-00-g1e4b59c9f-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-g1e4b59c9f-0 (missing) -> 7.4-dev-20200410-00-g1e4b59c9f-0~deb10u1

CLANG Static Analyzer Summary

  • Github Pull Request 6191, comparing to Git base SHA 43086e6
  • Base image data for Git 43086e6 does not exist - compare skipped

1 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11774/artifact/shared/static_analysis/index.html

@NaveenThanikachalam
Copy link
Contributor Author

ci:rerun

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Apr 10, 2020

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-11775/

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:

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-11775/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: pkg-js-tools-test-is-missing
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-g1e4b59c9f-0 (missing) -> 7.4-dev-20200410-00-g1e4b59c9f-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-g1e4b59c9f-0 (missing) -> 7.4-dev-20200410-00-g1e4b59c9f-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-g1e4b59c9f-0 (missing) -> 7.4-dev-20200410-00-g1e4b59c9f-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-g1e4b59c9f-0 (missing) -> 7.4-dev-20200410-00-g1e4b59c9f-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-g1e4b59c9f-0 (missing) -> 7.4-dev-20200410-00-g1e4b59c9f-0~deb10u1

CLANG Static Analyzer Summary

  • Github Pull Request 6191, comparing to Git base SHA 43086e6
  • Base image data for Git 43086e6 does not exist - compare skipped

1 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11775/artifact/shared/static_analysis/index.html

@NaveenThanikachalam
Copy link
Contributor Author

ci:rerun

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Apr 10, 2020

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-11782/

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:

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-11782/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: pkg-js-tools-test-is-missing
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-g1e4b59c9f-0 (missing) -> 7.4-dev-20200410-00-g1e4b59c9f-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-g1e4b59c9f-0 (missing) -> 7.4-dev-20200410-00-g1e4b59c9f-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-g1e4b59c9f-0 (missing) -> 7.4-dev-20200410-00-g1e4b59c9f-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-g1e4b59c9f-0 (missing) -> 7.4-dev-20200410-00-g1e4b59c9f-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200410-00-g1e4b59c9f-0 (missing) -> 7.4-dev-20200410-00-g1e4b59c9f-0~deb10u1

CLANG Static Analyzer Summary

  • Github Pull Request 6191, comparing to Git base SHA 43086e6
  • Base image data for Git 43086e6 does not exist - compare skipped

1 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11782/artifact/shared/static_analysis/index.html

bgpd/bgp_nht.c Outdated Show resolved Hide resolved
Problem Description:
=====================
+--+                                            +--+
|R1|-(192.201.202.1)----iBGP----(192.201.202.2)-|R2|
+--+                                            +--+

Routes on R2:
=============
S>* 202.202.202.202/32 [1/0] via 192.201.78.1, ens256, 00:40:48
Where, the next-hop network, 192.201.78.0/24, is a directly connected network address.
C>* 192.201.78.0/24 is directly connected, ens256, 00:40:48

Configurations on R1:
=====================
!
router bgp 201
 bgp router-id 192.168.0.1
 neighbor 192.201.202.2 remote-as 201
!

Configurations on R2:
=====================
!
ip route 202.202.202.202/32 192.201.78.1
!
router bgp 201
 bgp router-id 192.168.0.2
 neighbor 192.201.202.1 remote-as 201
 !
 address-family ipv4 unicast
  redistribute static
 exit-address-family
!

Step-1:
=======
R1 receives the route 202.202.202.202/32 from R2.
R1 installs the route in its BGP RIB.

Step-2:
=======
On R1, a connected interface address is added.
The address is the same as the next-hop of the BGP route received from R2 (192.201.78.1).

Point of Failure:
=================
R1 resolves the BGP route even though the route's next-hop is its own connected address.
Even though this appears to be a misconfiguration it would still be better to safeguard the code against it.

Fix:
====
When BGP receives a connected route from Zebra, it processes the
routes for the next-hop update.
While doing so, BGP must ignore routes whose next-hop address matches
the address of the connected route for which Zebra sent the next-hop update
message.

Signed-off-by: NaveenThanikachalam <nthanikachal@vmware.com>
@LabN-CI
Copy link
Collaborator

LabN-CI commented Apr 11, 2020

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/6191 e7cbe5e
Date 04/11/2020
Start 10:30:44
Finish 10:56:35
Run-Time 25:51
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2020-04-11-10:30:44.txt
Log autoscript-2020-04-11-10:31:39.log.bz2
Memory 493 491 429

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-11791/

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:

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-11791/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: pkg-js-tools-test-is-missing
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200411-00-ge7cbe5e59-0 (missing) -> 7.4-dev-20200411-00-ge7cbe5e59-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200411-00-ge7cbe5e59-0 (missing) -> 7.4-dev-20200411-00-ge7cbe5e59-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200411-00-ge7cbe5e59-0 (missing) -> 7.4-dev-20200411-00-ge7cbe5e59-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200411-00-ge7cbe5e59-0 (missing) -> 7.4-dev-20200411-00-ge7cbe5e59-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.4-dev-20200411-00-ge7cbe5e59-0 (missing) -> 7.4-dev-20200411-00-ge7cbe5e59-0~deb10u1

CLANG Static Analyzer Summary

  • Github Pull Request 6191, comparing to Git base SHA eb728e0
  • Base image data for Git eb728e0 does not exist - compare skipped

1 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11791/artifact/shared/static_analysis/index.html

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.

@NaveenThanikachalam can we have this behavior covered in topotests?

@NaveenThanikachalam
Copy link
Contributor Author

@NaveenThanikachalam can we have this behavior covered in topotests?

Thanks, @ton31337. Sure, I'll write up a topotest for this.

Copy link
Member

@riw777 riw777 left a comment

Choose a reason for hiding this comment

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

looks correct -- thanks for catching this

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, regarding topotests, VMWare team is writing a topotest for this which will be presented soon.

@ton31337 ton31337 merged commit 4c60e50 into FRRouting:master Apr 21, 2020
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