]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Warn user when an interface has no v6 LL address associated with it
authorDonald Sharp <sharpd@nvidia.com>
Mon, 7 Mar 2022 13:00:26 +0000 (08:00 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Mon, 7 Mar 2022 13:00:26 +0000 (08:00 -0500)
When BGP detects that a peering is using a global address but no v6 LL
address has been created for the interface that the global address is
on warn the user that something is amiss and they need to fix it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd/bgp_errors.c
bgpd/bgp_errors.h
bgpd/bgp_zebra.c

index f11717b41fcedb19a9c8ce8f30a4332e9f794bab..193c96a1698e4dc00cbdb29cc6e05492b5b52525 100644 (file)
@@ -474,6 +474,12 @@ static struct log_ref ferr_bgp_err[] = {
                .description = "BGP route for the specified AFI/SAFI is NULL",
                .suggestion = "Get log files from router and open an issue",
        },
+       {
+               .code = EC_BGP_NO_LL_ADDRESS_AVAILABLE,
+               .title = "BGP v6 peer with no LL address on outgoing interface",
+               .description = "BGP when using a v6 peer requires a v6 LL address to be configured on the outgoing interface as per RFC 4291 section 2.1",
+               .suggestion = "Add a v6 LL address to the outgoing interfaces as per RFC",
+       },
        {
                .code = END_FERR,
        }
index 20056d382ae85b90f8888852ee174fcf4bb7e911..0b71af3fc60a1586fc18b787893f360f930ad724 100644 (file)
@@ -101,6 +101,7 @@ enum bgp_log_refs {
        EC_BGP_ROUTER_ID_SAME,
        EC_BGP_INVALID_BGP_INSTANCE,
        EC_BGP_INVALID_ROUTE,
+       EC_BGP_NO_LL_ADDRESS_AVAILABLE,
 };
 
 extern void bgp_error_init(void);
index c0a9a387735e73eb655cf23404b1c4b43a745aad..78eaac78062619a6d95fc10e751a822087e14991 100644 (file)
@@ -882,6 +882,12 @@ bool bgp_zebra_nexthop_set(union sockunion *local, union sockunion *remote,
                         */
                        if (!v6_ll_avail && if_is_loopback(ifp))
                                v6_ll_avail = true;
+                       else {
+                               flog_warn(
+                                       EC_BGP_NO_LL_ADDRESS_AVAILABLE,
+                                       "Interface: %s does not have a v6 LL address associated with it, waiting until one is created for it",
+                                       ifp->name);
+                       }
                } else
                /* Link-local address. */
                {