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

lib, zebra: Notice DAD Failed but don't use #6638

Closed
wants to merge 1 commit into from

Conversation

donaldsharp
Copy link
Member

ipv6 addresses on interfaces can be notified to zebra
that the kernel has noticed that a interface has
a duplicate address on an interface.

When this happens the kernel tells zebra about this
situation. Prior to this change we were just silently
dropping this and never creating a connected interface.

With this change we now notice that a interface is in
a DAD state, keep the connected interface as well as
marking the created route as rejected. Hopefully we
add enough bread crumbs to allow the end user to figure
out what has gone wrong.

From talking with kernel people you can modify kernel
behavior for DAD routes via the accept_dad sysctl.
Please see the kernel documenation for how it works.

Additionally the official recovery methodology
is to fix the address and then down/up the link.

Signed-off-by: Donald Sharp sharpd@cumulusnetworks.com

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/16029428d9fbcdf8637c6fca4600edd9/raw/2e8be21419860bfdf33050f7e190536591b591ba/cr_6638_1593030696.diff | git apply

diff --git a/lib/if.h b/lib/if.h
index 5dc16abc2..ba7975389 100644
--- a/lib/if.h
+++ b/lib/if.h
@@ -411,7 +411,7 @@ struct connected {
 #define ZEBRA_IFA_SECONDARY    (1 << 0)
 #define ZEBRA_IFA_PEER         (1 << 1)
 #define ZEBRA_IFA_UNNUMBERED   (1 << 2)
-#define ZEBRA_IFA_DADFAILED    (1 << 3)
+#define ZEBRA_IFA_DADFAILED (1 << 3)
 	/* N.B. the ZEBRA_IFA_PEER flag should be set if and only if
 	   a peer address has been configured.  If this flag is set,
 	   the destination field must contain the peer address.
diff --git a/lib/zclient.h b/lib/zclient.h
index 9bfac453b..7149cbaaf 100644
--- a/lib/zclient.h
+++ b/lib/zclient.h
@@ -456,14 +456,14 @@ struct zapi_route {
  * route entry.  This mainly is used for backup static routes.
  */
 #define ZEBRA_FLAG_RR_USE_DISTANCE    0x40
-/*
- * With IPv6 routes, there is a mechanism for DAD
- * when FRR detects this, we need to note to the rib
- * that it *exists* but there is a problem.
- * this is how this is done.
-#define ZEBRA_FLAG_NEVER_SELECT       0x80
+	/*
+	 * With IPv6 routes, there is a mechanism for DAD
+	 * when FRR detects this, we need to note to the rib
+	 * that it *exists* but there is a problem.
+	 * this is how this is done.
+	#define ZEBRA_FLAG_NEVER_SELECT       0x80
 
-	/* The older XXX_MESSAGE flags live here */
+		/* The older XXX_MESSAGE flags live here */
 	uint8_t message;
 
 	/*

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

@mjstapp mjstapp self-requested a review June 24, 2020 20:36
@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Jun 24, 2020

Continuous Integration Result: FAILED

Continuous Integration Result: FAILED

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

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

Ubuntu 16.04 arm8 build: Failed (click for details)

Make failed for Ubuntu 16.04 arm8 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/U16ARM8BUILD/ErrorLog/log_make.txt)

Makefile:10197: warning: ignoring old recipe for target 'grpc/grpc_libfrrgrpc_pb_la-frr-northbound.grpc.pb.lo.bc'
In file included from lib/bfd.c:30:0:
lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
In file included from lib/bfd.h:27:0,
./lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
cc1: all warnings being treated as errors
Makefile:7320: recipe for target 'lib/bfd.lo' failed
make[1]: *** [lib/bfd.lo] Error 1
In file included from lib/libfrr.c:35:0:
Fedora 29 amd64 build: Failed (click for details)

Make failed for Fedora 29 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/F29BUILD/ErrorLog/log_make.txt)

make[1]: Entering directory '/home/ci/cibuild.12855/frr-source'
In file included from lib/bfd.c:30:
lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
In file included from lib/bfd.h:27,
./lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
cc1: all warnings being treated as errors
make[1]: *** [Makefile:7809: lib/bfd.lo] Error 1
In file included from lib/libfrr.c:35:
lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]

Fedora 29 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/F29BUILD/config.status/config.status

FreeBSD 11 amd64 build: Failed (click for details)

Make failed for FreeBSD 11 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/CI009BUILD/ErrorLog/log_make.txt)

gmake[1]: Entering directory '/usr/home/ci/cibuild.12855/frr-source'
In file included from lib/bfd.c:30:
lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
In file included from lib/bfd.h:27,
./lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
cc1: all warnings being treated as errors
gmake[1]: *** [Makefile:7809: lib/bfd.lo] Error 1
In file included from lib/libfrr.c:35:
lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]

FreeBSD 11 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/CI009BUILD/config.status/config.status

Ubuntu 16.04 arm7 build: Failed (click for details)

Make failed for Ubuntu 16.04 arm7 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/CI101BUILD/ErrorLog/log_make.txt)

Makefile:10197: warning: ignoring old recipe for target 'grpc/grpc_libfrrgrpc_pb_la-frr-northbound.grpc.pb.lo.bc'
In file included from lib/bfd.c:30:0:
lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
In file included from lib/bfd.h:27:0,
./lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
cc1: all warnings being treated as errors
Makefile:7320: recipe for target 'lib/bfd.lo' failed
make[1]: *** [lib/bfd.lo] Error 1
In file included from lib/libfrr.c:35:0:
FreeBSD 12 amd64 build: Failed (click for details)

Make failed for FreeBSD 12 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/FBSD12AMD64/ErrorLog/log_make.txt)

gmake[1]: Entering directory '/usr/home/ci/cibuild.12855/frr-source'
In file included from lib/bfd.c:30:0:
lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
In file included from lib/bfd.h:27:0,
./lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
cc1: all warnings being treated as errors
gmake[1]: *** [Makefile:7809: lib/bfd.lo] Error 1
In file included from lib/libfrr.c:35:0:
lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]

FreeBSD 12 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/FBSD12AMD64/config.status/config.status

Debian 10 amd64 build: Failed (click for details)

Make failed for Debian 10 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/DEB10BUILD/ErrorLog/log_make.txt)

make[1]: Entering directory '/home/ci/cibuild.12855/frr-source'
In file included from lib/bfd.c:30:
lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
In file included from lib/bfd.h:27,
./lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
cc1: all warnings being treated as errors
make[1]: *** [Makefile:7810: lib/bfd.lo] Error 1
In file included from lib/libfrr.c:35:
lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]

Debian 10 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/DEB10BUILD/config.status/config.status

NetBSD 8 amd64 build: Failed (click for details)

Make failed for NetBSD 8 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/CI012BUILD/ErrorLog/log_make.txt)

gmake[1]: Entering directory '/home/ci/cibuild.12855/frr-source'
In file included from lib/bfd.c:30:0:
lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
In file included from lib/bfd.h:27:0,
./lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
cc1: all warnings being treated as errors
gmake[1]: *** [Makefile:7809: lib/bfd.lo] Error 1
In file included from lib/libfrr.c:35:0:
lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]

NetBSD 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/CI012BUILD/config.status/config.status

Ubuntu 16.04 amd64 build: Failed (click for details)

Make failed for Ubuntu 16.04 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/CI014BUILD/ErrorLog/log_make.txt)

Makefile:10197: warning: ignoring old recipe for target 'grpc/grpc_libfrrgrpc_pb_la-frr-northbound.grpc.pb.lo.bc'
In file included from bgpd/bgp_bfd.c:32:0:
./lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
In file included from ./lib/bfd.h:27:0,
./lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
cc1: all warnings being treated as errors
Makefile:7304: recipe for target 'bgpd/bgp_bfd.o' failed
make[1]: *** [bgpd/bgp_bfd.o] Error 1
In file included from ./bgpd/bgp_pbr.h:23:0,

Ubuntu 16.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/CI014BUILD/config.status/config.status

Ubuntu 18.04 amd64 build: Failed (click for details)

Make failed for Ubuntu 18.04 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/U1804AMD64/ErrorLog/log_make.txt)

Makefile:10197: warning: ignoring old recipe for target 'grpc/grpc_libfrrgrpc_pb_la-frr-northbound.grpc.pb.lo.bc'
In file included from bgpd/bgp_bfd.c:32:0:
./lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
In file included from ./lib/bfd.h:27:0,
./lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
cc1: all warnings being treated as errors
Makefile:7304: recipe for target 'bgpd/bgp_bfd.o' failed
make[1]: *** [bgpd/bgp_bfd.o] Error 1
In file included from ./bgpd/bgp_pbr.h:23:0,

Ubuntu 18.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/U1804AMD64/config.status/config.status

Ubuntu 16.04 i386 build: Failed (click for details)

Make failed for Ubuntu 16.04 i386 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/U1604I386/ErrorLog/log_make.txt)

Makefile:10197: warning: ignoring old recipe for target 'grpc/grpc_libfrrgrpc_pb_la-frr-northbound.grpc.pb.lo.bc'
In file included from bgpd/bgp_bfd.c:32:0:
./lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
In file included from ./lib/bfd.h:27:0,
./lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
cc1: all warnings being treated as errors
Makefile:7304: recipe for target 'bgpd/bgp_bfd.o' failed
make[1]: *** [bgpd/bgp_bfd.o] Error 1
In file included from ./bgpd/bgp_pbr.h:23:0,

Ubuntu 16.04 i386 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/U1604I386/config.status/config.status

CentOS 7 amd64 build: Failed (click for details)

Make failed for CentOS 7 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/CI005BUILD/ErrorLog/log_make.txt)

 ^
zebra/connected.c: In function connected_up:
zebra/connected.c:257:12: error: ZEBRA_FLAG_NEVER_SELECT undeclared (first use in this function)
zebra/connected.c:257:12: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [zebra/connected.o] Error 1
In file included from ./zebra/zserv.h:33:0,
./lib/zclient.h:466:2: warning: "/*" within comment [-Wcomment]
 ^
In file included from zebra/interface.c:35:0:

CentOS 7 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/CI005BUILD/config.status/config.status

Ubuntu 18.04 arm7 build: Failed (click for details)

Make failed for Ubuntu 18.04 arm7 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/U18ARM7BUILD/ErrorLog/log_make.txt)

Makefile:10197: warning: ignoring old recipe for target 'grpc/grpc_libfrrgrpc_pb_la-frr-northbound.grpc.pb.lo.bc'
In file included from lib/bfd.c:30:0:
lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
In file included from lib/bfd.h:27:0,
./lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
cc1: all warnings being treated as errors
Makefile:7320: recipe for target 'lib/bfd.lo' failed
make[1]: *** [lib/bfd.lo] Error 1
In file included from lib/libfrr.c:35:0:
Debian 8 amd64 build: Failed (click for details)

Make failed for Debian 8 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/CI008BLD/ErrorLog/log_make.txt)

Makefile:10182: warning: ignoring old recipe for target 'grpc/grpc_libfrrgrpc_pb_la-frr-northbound.grpc.pb.lo.bc'
In file included from bgpd/bgp_bfd.c:32:0:
./lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
 ^
In file included from ./lib/bfd.h:27:0,
./lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
 ^
cc1: all warnings being treated as errors
Makefile:7291: recipe for target 'bgpd/bgp_bfd.o' failed

Debian 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/CI008BLD/config.status/config.status

Ubuntu 18.04 arm8 build: Failed (click for details)

Make failed for Ubuntu 18.04 arm8 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/U18ARM8BUILD/ErrorLog/log_make.txt)

Makefile:10197: warning: ignoring old recipe for target 'grpc/grpc_libfrrgrpc_pb_la-frr-northbound.grpc.pb.lo.bc'
In file included from lib/bfd.c:30:0:
lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
In file included from lib/bfd.h:27:0,
./lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
cc1: all warnings being treated as errors
Makefile:7320: recipe for target 'lib/bfd.lo' failed
make[1]: *** [lib/bfd.lo] Error 1
In file included from lib/libfrr.c:35:0:
Ubuntu 18.04 ppc64le build: Failed (click for details)

Make failed for Ubuntu 18.04 ppc64le build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/U1804PPC64LEBUILD/ErrorLog/log_make.txt)

Makefile:10197: warning: ignoring old recipe for target 'grpc/grpc_libfrrgrpc_pb_la-frr-northbound.grpc.pb.lo.bc'
In file included from ./bgpd/bgp_pbr.h:23:0,
./lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
cc1: all warnings being treated as errors
Makefile:7304: recipe for target 'bgpd/bgp_ecommunity.o' failed
make[1]: *** [bgpd/bgp_ecommunity.o] Error 1
In file included from bgpd/bgp_evpn.c:32:0:
./lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
In file included from ./bgpd/bgp_flowspec_util.h:22:0,

Ubuntu 18.04 ppc64le build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/U1804PPC64LEBUILD/config.status/config.status

Debian 9 amd64 build: Failed (click for details)

Make failed for Debian 9 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/CI021BUILD/ErrorLog/log_make.txt)

Makefile:10197: warning: ignoring old recipe for target 'grpc/grpc_libfrrgrpc_pb_la-frr-northbound.grpc.pb.lo.bc'
In file included from bgpd/bgp_bfd.c:32:0:
./lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
In file included from ./lib/bfd.h:27:0,
./lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
cc1: all warnings being treated as errors
Makefile:7304: recipe for target 'bgpd/bgp_bfd.o' failed
make[1]: *** [bgpd/bgp_bfd.o] Error 1
In file included from ./bgpd/bgp_pbr.h:23:0,

Debian 9 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/CI021BUILD/config.status/config.status

Ubuntu 20.04 amd64 build: Failed (click for details) Ubuntu 20.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/U2004AMD64BUILD/config.status/config.status

Make failed for Ubuntu 20.04 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/U2004AMD64BUILD/ErrorLog/log_make.txt)

make[1]: Entering directory '/home/ci/cibuild.12855/frr-source'
In file included from lib/bfd.c:30:
lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
In file included from lib/bfd.h:27,
./lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
cc1: all warnings being treated as errors
make[1]: *** [Makefile:7810: lib/bfd.lo] Error 1
In file included from lib/libfrr.c:35:
lib/zclient.h:466:2: error: "/*" within comment [-Werror=comment]
OpenBSD 6 amd64 build: Failed (click for details)

Make failed for OpenBSD 6 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/CI011BUILD/ErrorLog/log_make.txt)

1 warning generated.
In file included from lib/bfd.c:30:
./lib/zclient.h:466:2: error: '/*' within block comment [-Werror,-Wcomment]
1 error generated.
gmake[1]: *** [Makefile:7808: lib/bfd.lo] Error 1
In file included from lib/libfrr.c:35:
./lib/zclient.h:466:2: error: '/*' within block comment [-Werror,-Wcomment]
1 error generated.
gmake[1]: *** [Makefile:7808: lib/libfrr.lo] Error 1

OpenBSD 6 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12855/artifact/CI011BUILD/config.status/config.status

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/49943a56615ee6ef7b159e90ddf624c0/raw/e466d8ab4fb43136600121fd7381f72f793194b5/cr_6638_1593032481.diff | git apply

diff --git a/lib/if.h b/lib/if.h
index 5dc16abc2..ba7975389 100644
--- a/lib/if.h
+++ b/lib/if.h
@@ -411,7 +411,7 @@ struct connected {
 #define ZEBRA_IFA_SECONDARY    (1 << 0)
 #define ZEBRA_IFA_PEER         (1 << 1)
 #define ZEBRA_IFA_UNNUMBERED   (1 << 2)
-#define ZEBRA_IFA_DADFAILED    (1 << 3)
+#define ZEBRA_IFA_DADFAILED (1 << 3)
 	/* N.B. the ZEBRA_IFA_PEER flag should be set if and only if
 	   a peer address has been configured.  If this flag is set,
 	   the destination field must contain the peer address.
diff --git a/lib/zclient.h b/lib/zclient.h
index 2f3d64051..129aa036d 100644
--- a/lib/zclient.h
+++ b/lib/zclient.h
@@ -462,7 +462,7 @@ struct zapi_route {
  * that it *exists* but there is a problem.
  * this is how this is done.
  */
-#define ZEBRA_FLAG_NEVER_SELECT       0x80
+#define ZEBRA_FLAG_NEVER_SELECT 0x80
 
 	/* The older XXX_MESSAGE flags live here */
 	uint8_t message;

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

@LabN-CI
Copy link
Collaborator

LabN-CI commented Jun 24, 2020

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git merge/6638 6211aea
Date 06/24/2020
Start 17:01:47
Finish 17:27:25
Run-Time 25:38
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2020-06-24-17:01:47.txt
Log autoscript-2020-06-24-17:02:45.log.bz2
Memory 497 498 426

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Jun 24, 2020

Continuous Integration Result: FAILED

Continuous Integration Result: FAILED

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

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 0 un Ubuntu 16.04 arm8: Failed (click for details)

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

Topology Tests failed for Topo tests part 0 un Ubuntu 16.04 arm8:

*** defaultIntf: warning: r1 has no interfaces
2020-06-24 22:54:41,096 ERROR: PIMd StdErr Log:% No Path to RP address specified: 192.168.100.1

2020-06-24 22:54:43,221 ERROR: PIMd StdErr Log:% No Path to RP address specified: 192.168.100.1

2020-06-24 22:54:49,564 ERROR: PIMd StdErr Log:% No Path to RP address specified: 192.168.100.1

2020-06-24 23:11:52,287 ERROR: 'router_json_cmp' failed after 47.81 seconds
2020-06-24 23:11:56,075 ERROR: assert failed at "test_pbr_topo1/test_pbr_data": "show pbr map" mismatches on r1
assert Generated JSON diff error report:
  
  > $: d2 has the following element at index 0 which is not present in d1: 
  
  	{
  	    "valid": false,
  	    "name": "AKIHABARA",
  	    "policies": [
  	        {
  	            "sequenceNumber": 5,
  	            "installedReason": "Valid",
  	            "installed": true,
  	            "nexthopGroup": {
  	                "installedInternally": 1,
  	                "name": "C",
  	                "installed": true
  	            },
  	            "matchDst": "192.168.4.0/24",
  	            "vrfUnchanged": false
  	        },
  	        {
  	            "nexthopGroup": {
  	                "installedInternally": 1,
  	                "name": "C",
  	                "installed": true
  	            },
  	            "installed": true,
  	            "installedReason": "Invalid Src or Dst",
  	            "sequenceNumber": 10,
  	            "vrfUnchanged": false
  	        },
  	        {
  	            "vrfUnchanged": false,
  	            "installedReason": "No Nexthops",
  	            "sequenceNumber": 15,
  	            "installed": false
  	        }
  	    ]
  	}
  
  	Closest match in d1 is at index 0 with the following errors: 
  
  	> $[0]->policies: d2 has the following element at index 0 which is not present in d1: 
  	
  		{
  		    "sequenceNumber": 5,
  		    "installedReason": "Valid",
  		    "installed": true,
  		    "nexthopGroup": {
  		        "installedInternally": 1,
  		        "name": "C",
  		        "installed": true
  		    },
  		    "matchDst": "192.168.4.0/24",
  		    "vrfUnchanged": false
  		}
  	
  		Closest match in d1 is at index 0 with the following errors: 
  	
  		> $[0]->policies[0]->installedReason: d1 has element with value 'Invalid NH-group' but in d2 it has value 'Valid'
  		> $[0]->policies[0]->installed: d1 has element with value 'False' but in d2 it has value 'True'
  		> $[0]->policies[0]->nexthopGroup->installedInternally: d1 has element with value '0' but in d2 it has value '1'
  		> $[0]->policies[0]->nexthopGroup->installed: d1 has element with value 'False' but in d2 it has value 'True'
  	
  	> $[0]->policies: d2 has the following element at index 1 which is not present in d1: 
  	
  		{
  		    "vrfUnchanged": false,
  		    "nexthopGroup": {
  		        "installedInternally": 1,
  		        "name": "C",
  		        "installed": true
  		    },
  		    "installedReason": "Invalid Src or Dst",
  		    "sequenceNumber": 10,
  		    "installed": true
  		}
  	
  		Closest match in d1 is at index 1 with the following errors: 
  	
  		> $[0]->policies[1]->installed: d1 has element with value 'False' but in d2 it has value 'True'
  		> $[0]->policies[1]->installedReason: d1 has element with value 'Invalid NH-group, Invalid Src or Dst' but in d2 it has value 'Invalid Src or Dst'
  		> $[0]->policies[1]->nexthopGroup->installedInternally: d1 has element with value '0' but in d2 it has value '1'
  		> $[0]->policies[1]->nexthopGroup->installed: d1 has element with value 'False' but in d2 it has value 'True'
  	
  
2020-06-24 23:37:21,338 ERROR: 'router_json_cmp' failed after 270.89 seconds

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

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

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

W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.4.1 (current is 4.3.0)
W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.4.1 (current is 4.3.0)
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200624-02-g6211aea87-0 (missing) -> 7.5-dev-20200624-02-g6211aea87-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200624-02-g6211aea87-0 (missing) -> 7.5-dev-20200624-02-g6211aea87-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200624-02-g6211aea87-0 (missing) -> 7.5-dev-20200624-02-g6211aea87-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200624-02-g6211aea87-0 (missing) -> 7.5-dev-20200624-02-g6211aea87-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200624-02-g6211aea87-0 (missing) -> 7.5-dev-20200624-02-g6211aea87-0~deb10u1

@donaldsharp
Copy link
Member Author

ci:rerun

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Jun 25, 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-12864/

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

W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.4.1 (current is 4.3.0)
W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.4.1 (current is 4.3.0)
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200624-02-g6211aea87-0 (missing) -> 7.5-dev-20200624-02-g6211aea87-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200624-02-g6211aea87-0 (missing) -> 7.5-dev-20200624-02-g6211aea87-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200624-02-g6211aea87-0 (missing) -> 7.5-dev-20200624-02-g6211aea87-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200624-02-g6211aea87-0 (missing) -> 7.5-dev-20200624-02-g6211aea87-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200624-02-g6211aea87-0 (missing) -> 7.5-dev-20200624-02-g6211aea87-0~deb10u1

Copy link
Contributor

@mjstapp mjstapp left a comment

Choose a reason for hiding this comment

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

Just had one question

@@ -1103,7 +1103,8 @@ static void rib_process(struct route_node *rn)
ROUTE_ENTRY_CHANGED);
new_fib = best;
} else {
best = rib_choose_best(new_selected, re);
if (!CHECK_FLAG(re->flags, ZEBRA_FLAG_NEVER_SELECT))
Copy link
Contributor

Choose a reason for hiding this comment

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

would it be better to stick this check into rib_choose_best() itself? just thinking that that might encapsulate the decision

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought about that and decided I wanted it right where we use the ZEBRA_FLAG_FIB_OVERRIDE since this is the opposite of that one.

Copy link
Contributor

@eqvinox eqvinox left a comment

Choose a reason for hiding this comment

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

Haven't reviewed the rest yet, but would rather double check that we don't create a flag mess here. Maybe ZEBRA_IFC_QUEUED needs to be renamed to ZEBRA_IFC_UNUSABLE or something.

@@ -411,6 +411,7 @@ struct connected {
#define ZEBRA_IFA_SECONDARY (1 << 0)
#define ZEBRA_IFA_PEER (1 << 1)
#define ZEBRA_IFA_UNNUMBERED (1 << 2)
#define ZEBRA_IFA_DADFAILED (1 << 3)
Copy link
Contributor

Choose a reason for hiding this comment

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

This might be functionally identical to / duplicate with !ZEBRA_IFC_REAL/ZEBRA_IFC_QUEUED. I think it might be better if we don't create a new flag for this and instead put a "unusable reason" in there separately.

Copy link
Contributor

Choose a reason for hiding this comment

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

Btw: despite the name, ZEBRA_IFC_QUEUED is very much intended for this use; I remember that @cfra actually worked on this a few years back. It's named QUEUED since the primary use was the DAD delay after adding an address until it becomes usable, but that's functionally pretty much equivalent to DAD failure.

Copy link
Member Author

Choose a reason for hiding this comment

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

QUEUED should match the TENTATIVE flag right? This is different right?

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 good -- just waiting on a resolution to the flags question

ipv6 addresses on interfaces can be notified to zebra
that the kernel has noticed that a interface has
a duplicate address on an interface.

When this happens the kernel tells zebra about this
situation.  Prior to this change we were just silently
dropping this and never creating a connected interface.

With this change we now notice that a interface is in
a DAD state, keep the connected interface as well as
marking the created route as rejected.  Hopefully we
add enough bread crumbs to allow the end user to figure
out what has gone wrong.

From talking with kernel people you can modify kernel
behavior for DAD routes via the accept_dad sysctl.
Please see the kernel documenation for how it works.

Additionally the `official` recovery methodology
is to fix the address and then down/up the link.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
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/d771bde9a2e30ff3acfa8d7aff496cf2/raw/278f75a1144faa8e51a99071adba97d68578dd00/cr_6638_1595867568.diff | git apply

diff --git a/lib/if.h b/lib/if.h
index 3bf745f75..07f0fd213 100644
--- a/lib/if.h
+++ b/lib/if.h
@@ -411,7 +411,7 @@ struct connected {
 #define ZEBRA_IFA_SECONDARY    (1 << 0)
 #define ZEBRA_IFA_PEER         (1 << 1)
 #define ZEBRA_IFA_UNNUMBERED   (1 << 2)
-#define ZEBRA_IFA_DADFAILED    (1 << 3)
+#define ZEBRA_IFA_DADFAILED (1 << 3)
 	/* N.B. the ZEBRA_IFA_PEER flag should be set if and only if
 	   a peer address has been configured.  If this flag is set,
 	   the destination field must contain the peer address.
diff --git a/lib/zclient.h b/lib/zclient.h
index ef4ef459a..510428a16 100644
--- a/lib/zclient.h
+++ b/lib/zclient.h
@@ -463,7 +463,7 @@ struct zapi_route {
  * that it *exists* but there is a problem.
  * this is how this is done.
  */
-#define ZEBRA_FLAG_NEVER_SELECT       0x80
+#define ZEBRA_FLAG_NEVER_SELECT 0x80
 
 	/* The older XXX_MESSAGE flags live here */
 	uint8_t message;
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c
index 6553a7a81..a4221627a 100644
--- a/zebra/kernel_socket.c
+++ b/zebra/kernel_socket.c
@@ -923,11 +923,10 @@ int ifam_read(struct ifa_msghdr *ifam)
 		}
 
 		if (ifam->ifam_type == RTM_NEWADDR)
-			connected_add_ipv6(ifp, flags, &addr.sin6.sin6_addr,
-					   NULL,
-					   ip6_masklen(mask.sin6.sin6_addr),
-					   (isalias ? ifname : NULL),
-					   METRIC_MAX, false);
+			connected_add_ipv6(
+				ifp, flags, &addr.sin6.sin6_addr, NULL,
+				ip6_masklen(mask.sin6.sin6_addr),
+				(isalias ? ifname : NULL), METRIC_MAX, false);
 		else
 			connected_delete_ipv6(ifp, &addr.sin6.sin6_addr, NULL,
 					      ip6_masklen(mask.sin6.sin6_addr));

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

@LabN-CI
Copy link
Collaborator

LabN-CI commented Jul 27, 2020

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/6638 d8b3f95
Date 07/27/2020
Start 13:31:51
Finish 13:57:52
Run-Time 26:01
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2020-07-27-13:31:51.txt
Log autoscript-2020-07-27-13:32:50.log.bz2
Memory 492 456 428

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

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

W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.4.1 (current is 4.3.0)
W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.4.1 (current is 4.3.0)
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200727-06-gd8b3f956f-0 (missing) -> 7.5-dev-20200727-06-gd8b3f956f-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200727-06-gd8b3f956f-0 (missing) -> 7.5-dev-20200727-06-gd8b3f956f-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200727-06-gd8b3f956f-0 (missing) -> 7.5-dev-20200727-06-gd8b3f956f-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200727-06-gd8b3f956f-0 (missing) -> 7.5-dev-20200727-06-gd8b3f956f-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200727-06-gd8b3f956f-0 (missing) -> 7.5-dev-20200727-06-gd8b3f956f-0~deb10u1

0, 0, &p, NULL, &nh, 0, zvrf->table_id, metric, 0, 0, 0);
if (CHECK_FLAG(ifc->conf, ZEBRA_IFC_QUEUED)
&& !CHECK_FLAG(ifc->conf, ZEBRA_IFC_REAL))
flags |= ZEBRA_FLAG_NEVER_SELECT;
Copy link
Contributor

Choose a reason for hiding this comment

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

The route is independent from the address; DAD failure doesn't make the route unusable. If we do weird things with the route, we can get desynced between what FRR expects to happen & what actually happens in forwarding...

@donaldsharp donaldsharp closed this Nov 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants