]> git.proxmox.com Git - mirror_frr.git/commitdiff
Merge pull request #4846 from vivek-cumulus/rfc-5549-gua-fix-ra
authorSri Mohana Singamsetty <srimohans@gmail.com>
Tue, 20 Aug 2019 16:07:54 +0000 (09:07 -0700)
committerGitHub <noreply@github.com>
Tue, 20 Aug 2019 16:07:54 +0000 (09:07 -0700)
Fix nexthop reg and RA enable for IPv4 route exchange using GUA IPv6 peering

21 files changed:
bgpd/bgp_aspath.c
bgpd/bgp_rpki.c
bgpd/bgp_table.c
bgpd/bgp_vty.c
isisd/isis_cli.c
lib/libfrr.c
lib/thread.c
ospf6d/ospf6_zebra.c
ospfd/ospf_errors.c
pbrd/pbrd.conf.sample
pimd/pim_bsm.c
pimd/pim_nht.c
redhat/frr.spec.in
sharpd/sharpd.conf.sample
staticd/staticd.conf.sample
tests/bgpd/test_bgp_table.c
tests/bgpd/test_bgp_table.py
yang/frr-bfdd.yang
yang/frr-isisd.yang
zebra/zebra_errors.c
zebra/zebra_vxlan.c

index 1385345d6486e231ff019b1b626f294e6ce01f9a..f5652b07c5e46cb66ef3a1ea2c5fbd26dd4b6411 100644 (file)
@@ -1466,7 +1466,7 @@ struct aspath *aspath_prepend(struct aspath *as1, struct aspath *as2)
        /* Not reached */
 }
 
-/* Iterate over AS_PATH segments and wipe all occurences of the
+/* Iterate over AS_PATH segments and wipe all occurrences of the
  * listed AS numbers. Hence some segments may lose some or even
  * all data on the way, the operation is implemented as a smarter
  * version of aspath_dup(), which allocates memory to hold the new
index 408d423aac32456257fd7df195db2de2266231e5..22840d54c6f8c0b908ea633ba0552a3ab532dc43 100644 (file)
@@ -142,7 +142,6 @@ static struct rtr_mgr_config *rtr_config;
 static struct list *cache_list;
 static int rtr_is_running;
 static int rtr_is_stopping;
-static int rtr_is_starting;
 static _Atomic int rtr_update_overflow;
 static int rpki_debug;
 static unsigned int polling_period;
@@ -478,7 +477,7 @@ static void rpki_update_cb_sync_rtr(struct pfx_table *p __attribute__((unused)),
                                    const struct pfx_record rec,
                                    const bool added __attribute__((unused)))
 {
-       if (rtr_is_stopping || rtr_is_starting
+       if (rtr_is_stopping
            || atomic_load_explicit(&rtr_update_overflow, memory_order_seq_cst))
                return;
 
@@ -570,11 +569,9 @@ static int bgp_rpki_module_init(void)
 
 static int start(void)
 {
-       unsigned int waiting_time = 0;
        int ret;
 
        rtr_is_stopping = 0;
-       rtr_is_starting = 1;
        rtr_update_overflow = 0;
 
        if (list_isempty(cache_list)) {
@@ -603,23 +600,6 @@ static int start(void)
                return ERROR;
        }
        rtr_is_running = 1;
-       RPKI_DEBUG("Waiting for rtr connection to synchronize.");
-       while (waiting_time++ <= initial_synchronisation_timeout) {
-               if (rtr_mgr_conf_in_sync(rtr_config))
-                       break;
-
-               sleep(1);
-       }
-       if (rtr_mgr_conf_in_sync(rtr_config)) {
-               RPKI_DEBUG("Got synchronisation with at least one RPKI cache!");
-               RPKI_DEBUG("Forcing revalidation.");
-               rtr_is_starting = 0;
-               revalidate_all_routes();
-       } else {
-               RPKI_DEBUG(
-                       "Timeout expired! Proceeding without RPKI validation data.");
-               rtr_is_starting = 0;
-       }
 
        XFREE(MTYPE_BGP_RPKI_CACHE_GROUP, groups);
 
@@ -1200,7 +1180,7 @@ DEFPY (show_rpki_prefix,
 {
 
        if (!is_synchronized()) {
-               vty_out(vty, "No Conection to RPKI cache server.\n");
+               vty_out(vty, "No Connection to RPKI cache server.\n");
                return CMD_WARNING;
        }
 
index ecde71279d2deed6f5b6e96d49cea506afd5c5f2..53175bfccf05828d513c1c0626541053ac35c2f1 100644 (file)
@@ -156,8 +156,10 @@ void bgp_table_range_lookup(const struct bgp_table *table, struct prefix *p,
        struct bgp_node *node = bgp_node_from_rnode(table->route_table->top);
        struct bgp_node *matched = NULL;
 
-       while (node && node->p.prefixlen <= p->prefixlen
-              && prefix_match(&node->p, p)) {
+       if (node == NULL)
+               return;
+
+       while (node->p.prefixlen <= p->prefixlen && prefix_match(&node->p, p)) {
                if (bgp_node_has_bgp_path_info_data(node)
                    && node->p.prefixlen == p->prefixlen) {
                        matched = node;
@@ -167,10 +169,10 @@ void bgp_table_range_lookup(const struct bgp_table *table, struct prefix *p,
                        &p->u.prefix, node->p.prefixlen)]);
        }
 
-       if (node == NULL)
-               return;
-
-       if ((matched == NULL && node->p.prefixlen > maxlen) || !node->parent)
+       if (matched == NULL && node->p.prefixlen <= maxlen
+           && prefix_match(p, &node->p) && node->parent == NULL)
+               matched = node;
+       else if ((matched == NULL && node->p.prefixlen > maxlen) || !node->parent)
                return;
        else if (matched == NULL)
                matched = node = bgp_node_from_rnode(node->parent);
index 58a202d5108868f999edc19170e2fe72a09bf399..50a439f00f9dcc5b8209c35b0ee44d8850a1333a 100644 (file)
@@ -6069,7 +6069,7 @@ DEFUN (neighbor_allowas_in,
        NEIGHBOR_STR
        NEIGHBOR_ADDR_STR2
        "Accept as-path with my AS present in it\n"
-       "Number of occurences of AS number\n"
+       "Number of occurrences of AS number\n"
        "Only accept my AS in the as-path if the route was originated in my AS\n")
 {
        int idx_peer = 1;
@@ -6103,7 +6103,7 @@ ALIAS_HIDDEN(
        "neighbor <A.B.C.D|X:X::X:X|WORD> allowas-in [<(1-10)|origin>]",
        NEIGHBOR_STR NEIGHBOR_ADDR_STR2
        "Accept as-path with my AS present in it\n"
-       "Number of occurences of AS number\n"
+       "Number of occurrences of AS number\n"
        "Only accept my AS in the as-path if the route was originated in my AS\n")
 
 DEFUN (no_neighbor_allowas_in,
@@ -6113,7 +6113,7 @@ DEFUN (no_neighbor_allowas_in,
        NEIGHBOR_STR
        NEIGHBOR_ADDR_STR2
        "allow local ASN appears in aspath attribute\n"
-       "Number of occurences of AS number\n"
+       "Number of occurrences of AS number\n"
        "Only accept my AS in the as-path if the route was originated in my AS\n")
 {
        int idx_peer = 2;
@@ -6135,7 +6135,7 @@ ALIAS_HIDDEN(
        "no neighbor <A.B.C.D|X:X::X:X|WORD> allowas-in [<(1-10)|origin>]",
        NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2
        "allow local ASN appears in aspath attribute\n"
-       "Number of occurences of AS number\n"
+       "Number of occurrences of AS number\n"
        "Only accept my AS in the as-path if the route was originated in my AS\n")
 
 DEFUN (neighbor_ttl_security,
index 4b432607731af74447825fe9d39288ea29c3f4a3..bd06286755910d3563515c84c3d6a8e4bb8fdacc 100644 (file)
@@ -363,7 +363,7 @@ void cli_show_ip_isis_bfd_monitoring(struct vty *vty, struct lyd_node *dnode,
        if (!yang_dnode_get_bool(dnode, NULL))
                vty_out(vty, " no");
 
-       vty_out(vty, "isis bfd\n");
+       vty_out(vty, " isis bfd\n");
 }
 
 /*
index 35c6092140cd11b16e9c05f45478585b4ede1364..4301dc20ad957c95661e6d67075df516f4ada59f 100644 (file)
@@ -410,7 +410,7 @@ static int frr_opt(int opt)
                }
                if (di->zpathspace)
                        fprintf(stderr,
-                               "-N option overriden by -z for zebra named socket path\n");
+                               "-N option overridden by -z for zebra named socket path\n");
 
                if (strchr(optarg, '/') || strchr(optarg, '.')) {
                        fprintf(stderr,
index 5756ebc1f99920b0eaaa02fab8ad48689e8b303c..943b849ebf10d5bd00d207adb5bf1e25a5e7fa0a 100644 (file)
@@ -714,7 +714,7 @@ static int fd_poll(struct thread_master *m, struct pollfd *pfds, nfds_t pfdsize,
 {
        /* If timer_wait is null here, that means poll() should block
         * indefinitely,
-        * unless the thread_master has overriden it by setting
+        * unless the thread_master has overridden it by setting
         * ->selectpoll_timeout.
         * If the value is positive, it specifies the maximum number of
         * milliseconds
index af16c5aa7cded703f57dfca72dfd986a0347f913..8454016b2e0ed111c79b58a7e69e3953fa948416 100644 (file)
@@ -258,7 +258,7 @@ DEFUN (show_zebra,
                return CMD_SUCCESS;
        }
 
-       vty_out(vty, "Zebra Infomation\n");
+       vty_out(vty, "Zebra Information\n");
        vty_out(vty, "  fail: %d\n", zclient->fail);
        vty_out(vty, "  redistribute default: %d\n",
                vrf_bitmap_check(zclient->default_information[AFI_IP6],
index dd0216019588fe25fe483810e3cc0168f65a6496..a985efc668b65972d8b09acd57ca21baff4fdd25 100644 (file)
@@ -39,7 +39,7 @@ static struct log_ref ferr_ospf_warn[] = {
        },
        {
                .code = EC_OSPF_PACKET,
-               .title = "OSPF has detected packet information missmatch",
+               .title = "OSPF has detected packet information mismatch",
                .description = "OSPF has detected that packet information received is incorrect",
                .suggestion = "Ensure interface configuration is correct, gather log files from here and the peer and open an Issue",
        },
index bb1c2edca825cf36f04f262d3b033b6b9ba3945f..c9e7dce01fb5c0739043677437eb2bcfddf2d2f3 100644 (file)
@@ -1,3 +1,19 @@
+! Sample pbrd configuration file
+!
+! A quick example of what a pbr configuration might look like
 !
 !
 log stdout
+!
+! nexthop-group TEST
+!   nexthop 4.5.6.7
+!   nexthop 5.6.7.8
+! !
+! pbr-map BLUE seq 100
+!   match dst-ip 9.9.9.0/24
+!   match src-ip 10.10.10.0/24
+!   set nexthop-group TEST
+! !
+! int swp1
+!   pbr-policy BLUE
+!
index 62f13b5b534199ee90ee20f7ebd4be714594ddb6..675092dbec18e748bff8aa0f66dbe53bd7595d9e 100644 (file)
@@ -711,11 +711,11 @@ static bool pim_bsm_frag_send(uint8_t *buf, uint32_t len, struct interface *ifp,
        /* MTU  passed here is PIM MTU (IP MTU less IP Hdr) */
        if (pim_mtu < (PIM_MIN_BSM_LEN)) {
                zlog_warn(
-                       "%s: mtu(pim mtu: %d) size less than minimum bootsrap len",
+                       "%s: mtu(pim mtu: %d) size less than minimum bootstrap len",
                        __PRETTY_FUNCTION__, pim_mtu);
                if (PIM_DEBUG_BSM)
                        zlog_debug(
-                               "%s: mtu (pim mtu:%d) less than minimum bootsrap len",
+                               "%s: mtu (pim mtu:%d) less than minimum bootstrap len",
                                __PRETTY_FUNCTION__, pim_mtu);
                return false;
        }
index 39dc8ad2faeb92a2e1da55c4532b4fa22ba89fa2..7900e392312571a7db1ac96f25fad89d7e24ee43 100644 (file)
@@ -479,7 +479,7 @@ static int pim_update_upstream_nh_helper(struct hash_bucket *bucket, void *arg)
                zlog_debug("%s: NHT upstream %s(%s) old ifp %s new ifp %s",
                        __PRETTY_FUNCTION__, up->sg_str, pim->vrf->name,
                        old.source_nexthop.interface
-                       ? old.source_nexthop.interface->name : "Unknwon",
+                       ? old.source_nexthop.interface->name : "Unknown",
                        up->rpf.source_nexthop.interface->name);
        }
 
index 27042e197ce5debc1d6b91f79eb26835749c5582..014cae02ee8840633a7ccb80a5a76b1084546158 100644 (file)
@@ -1,6 +1,6 @@
 # configure options
 #
-# Some can be overriden on rpmbuild commandline with:
+# Some can be overridden on rpmbuild commandline with:
 # rpmbuild --define 'variable value'
 #   (use any value, ie 1 for flag "with_XXXX" definitions)
 #
index bb1c2edca825cf36f04f262d3b033b6b9ba3945f..d1cc19a51ff482cb9e630e05f988ae650ad38e6f 100644 (file)
@@ -1,3 +1,6 @@
+! Default sharpd configuration sample
 !
+! There are no `default` configuration commands for sharpd
+! all commands are at the view or enable level.
 !
 log stdout
index bb1c2edca825cf36f04f262d3b033b6b9ba3945f..3b64eb9c90d59f5e6fed241b9930516a144471cc 100644 (file)
@@ -1,3 +1,5 @@
-!
+! Default staticd configuration sample
 !
 log stdout
+!
+! ip route 4.5.6.7/32 10.10.10.10
index 7b38df5f66a27e092c4e1a96c301ec349f87e36c..819c2d728269b6e95ee593bf5d2e7cb660aae5c5 100644 (file)
@@ -183,7 +183,7 @@ static void test_range_lookup(void)
 
        do_test(table, "16.0.0.0/8", 16, "16.0.0.0/16", NULL);
 
-       do_test(table, "0.0.0.0/3", 21, "1.16.0.0/16", "1.16.128.0/18",
+       do_test(table, "0.0.0.0/2", 21, "1.16.0.0/16", "1.16.128.0/18",
                "1.16.192.0/18", "1.16.64.0/19", "1.16.160.0/19",
                "1.16.32.0/20", "1.16.32.0/21", "16.0.0.0/16", NULL);
 }
index 4423530fe0e31f49c9efe81c1570bb85e1cc5c8d..4deaf08c22e16dda9890cdc9fce53c65c57d25bd 100644 (file)
@@ -3,5 +3,5 @@ import frrtest
 class TestTable(frrtest.TestMultiOut):
     program = './test_bgp_table'
 
-for i in range(6):
+for i in range(9):
     TestTable.onesimple('Checks successfull')
index 24ca8f68a8b955876766afd7f0f30899afc5e333..f9ac2e43b0fbc50421eb5a6b38e6f436c1ea9930 100644 (file)
@@ -264,22 +264,22 @@ module frr-bfdd {
 
     leaf session-down-count {
       type uint32;
-      description "Amount of times the session went down";
+      description "Number of times the session went down";
     }
 
     leaf session-up-count {
       type uint32;
-      description "Amount of times the session went up";
+      description "Number of times the session went up";
     }
 
     leaf control-packet-input-count {
       type uint64;
-      description "Amount of control packets received";
+      description "Number of control packets received";
     }
 
     leaf control-packet-output-count {
       type uint64;
-      description "Amount of control packets sent";
+      description "Number of control packets sent";
     }
 
     /*
@@ -296,12 +296,12 @@ module frr-bfdd {
      */
     leaf echo-packet-input-count {
       type uint64;
-      description "Amount of echo packets received";
+      description "Number of echo packets received";
     }
 
     leaf echo-packet-output-count {
       type uint64;
-      description "Amount of echo packets sent";
+      description "Number of echo packets sent";
     }
   }
 
index 05a896a1dbd7d7344b12adaaee45491a4e0df58f..9180b0c5f3d2208f336b6594392a94db4805d559 100644 (file)
@@ -1024,7 +1024,7 @@ module frr-isisd {
       "This notification is sent when we attempt to propagate
        an LSP that is larger than the dataLinkBlockSize for the
        circuit.  The notification generation must be throttled
-       with at least 5 seconds betweeen successive
+       with at least 5 seconds between successive
        notifications.";
     uses notification-instance-hdr;
 
@@ -1090,7 +1090,7 @@ module frr-isisd {
       "This notification is sent when we receive a PDU
        with a different value for the System ID length.
        The notification generation must be throttled
-       with at least 5 seconds betweeen successive
+       with at least 5 seconds between successive
        notifications.";
     uses notification-instance-hdr;
 
@@ -1114,7 +1114,7 @@ module frr-isisd {
       "This notification is sent when we receive a PDU
        with a different value for the Maximum Area Addresses.
        The notification generation must be throttled
-       with at least 5 seconds betweeen successive
+       with at least 5 seconds between successive
        notifications.";
     uses notification-instance-hdr;
 
@@ -1170,7 +1170,7 @@ module frr-isisd {
       "This notification is sent when the system receives a
        PDU with the wrong authentication type field.
        The notification generation must be throttled
-       with at least 5 seconds betweeen successive
+       with at least 5 seconds between successive
        notifications.";
     uses notification-instance-hdr;
 
@@ -1188,7 +1188,7 @@ module frr-isisd {
       "This notification is sent when the system receives
        a PDU with the wrong authentication information.
        The notification generation must be throttled with
-       with at least 5 seconds betweeen successive
+       with at least 5 seconds between successive
        notifications.";
     uses notification-instance-hdr;
 
@@ -1206,7 +1206,7 @@ module frr-isisd {
       "This notification is sent when the system receives a
        PDU with a different protocol version number.
        The notification generation must be throttled
-       with at least 5 seconds betweeen successive
+       with at least 5 seconds between successive
        notifications.";
     uses notification-instance-hdr;
 
@@ -1230,7 +1230,7 @@ module frr-isisd {
       "This notification is sent when the system receives a
        Hello PDU from an IS that does not share any area
        address. The notification generation must be throttled
-       with at least 5 seconds betweeen successive
+       with at least 5 seconds between successive
        notifications.";
     uses notification-instance-hdr;
 
@@ -1248,7 +1248,7 @@ module frr-isisd {
       "This notification is sent when the system receives a
        Hello PDU from an IS but does not establish an adjacency
        for some reason. The notification generation must be
-       throttled with at least 5 seconds betweeen successive
+       throttled with at least 5 seconds between successive
        notifications.";
     uses notification-instance-hdr;
 
@@ -1273,7 +1273,7 @@ module frr-isisd {
     description
       "This notification is sent when the system  receives an
        LSP with a parse error. The notification generation must
-       be throttled with at least 5 seconds betweeen successive
+       be throttled with at least 5 seconds between successive
        notifications.";
     uses notification-instance-hdr;
 
@@ -1350,7 +1350,7 @@ module frr-isisd {
     description
       "This notification is sent when an LSP is received.
        The notification generation must be throttled with at
-       least 5 seconds betweeen successive notifications.";
+       least 5 seconds between successive notifications.";
     uses notification-instance-hdr;
 
     uses notification-interface-hdr;
@@ -1384,7 +1384,7 @@ module frr-isisd {
     description
       "This notification is sent when an LSP is regenerated.
        The notification generation must be throttled with at
-       least 5 seconds betweeen successive notifications.";
+       least 5 seconds between successive notifications.";
     uses notification-instance-hdr;
 
     leaf lsp-id {
index 5f0a9ec011387dadf62e8622700d7cc6858d6625..a7e5147af3ca1171d70f802b646f5ee228bf03a9 100644 (file)
@@ -659,7 +659,7 @@ static struct log_ref ferr_zebra_err[] = {
        {
                .code = EC_ZEBRA_RTM_VERSION_MISMATCH,
                .title =
-                       "Zebra received kernel message with uknown version",
+                       "Zebra received kernel message with unknown version",
                .description =
                        "Zebra received a message from the kernel with a message version that does not match Zebra's internal version. Depending on version compatibility, this may cause issues sending and receiving messages to the kernel.",
                .suggestion =
index 1450072aa988eb561268985b4248a42168019679..9fc8235bae68d86493aeb003ff6e31598c767e23 100644 (file)
@@ -6772,7 +6772,7 @@ int zebra_vxlan_clear_dup_detect_vni_ip(struct vty *vty,
 
        if (!CHECK_FLAG(nbr->flags, ZEBRA_NEIGH_DUPLICATE)) {
                vty_out(vty,
-                       "%% Requsted host IP %s is not duplicate detected\n",
+                       "%% Requested host IP %s is not duplicate detected\n",
                        buf);
                return CMD_WARNING;
        }