]> git.proxmox.com Git - mirror_frr.git/commitdiff
Merge pull request #2926 from donaldsharp/router
authorDavid Lamparter <equinox@diac24.net>
Fri, 26 Oct 2018 20:24:15 +0000 (22:24 +0200)
committerGitHub <noreply@github.com>
Fri, 26 Oct 2018 20:24:15 +0000 (22:24 +0200)
zebra_ns split up

65 files changed:
babeld/babel_interface.h
babeld/babel_main.c
bgpd/bgp_attr.c
bgpd/bgp_damp.c
bgpd/bgp_errors.c
bgpd/bgp_evpn.c
bgpd/bgp_evpn_vty.c
bgpd/bgp_fsm.c
bgpd/bgp_packet.c
bgpd/bgp_route.c
bgpd/bgp_updgrp_adv.c
bgpd/bgp_updgrp_packet.c
bgpd/bgp_vty.c
debianpkg/frr.logrotate
debianpkg/frr.manpages
debianpkg/tests/daemons
doc/manpages/common-options.rst
doc/manpages/zebra.rst
eigrpd/eigrp_const.h
eigrpd/eigrp_dump.c
eigrpd/eigrp_fsm.c
isisd/isis_lsp.c
isisd/isis_lsp.h
isisd/isis_spf.c
isisd/isis_spf.h
isisd/isisd.c
isisd/isisd.h
ldpd/ldp_vty_cmds.c
ldpd/util.c
lib/bfd.c
lib/command.c
lib/command.h
lib/lib_errors.c
lib/mpls.h
lib/sockunion.c
m4/ax_sys_weak_alias.m4
ospf6d/ospf6_abr.c
ospf6d/ospf6_area.c
ospfd/ospf_ism.c
ospfd/ospf_nsm.c
ospfd/ospf_opaque.c
ospfd/ospf_packet.c
ospfd/ospf_ri.c
ospfd/ospf_te.c
ospfd/ospfd.c
pbrd/pbr_zebra.c
pimd/pim_instance.c
pimd/pim_msdp.c
pimd/pim_upstream.c
ripd/ripd.c
ripngd/ripngd.c
staticd/static_vrf.c
staticd/static_vty.c
tools/etc/frr/daemons
tools/etc/frr/daemons.conf
tools/etc/rsyslog.d/45-frr.conf
tools/frr.in
tools/start-stop-daemon.c
vtysh/vtysh_config.c
zebra/if_sysctl.c
zebra/irdp_packet.c
zebra/kernel_socket.c
zebra/rt_socket.c
zebra/zebra_vty.c
zebra/zebra_vxlan.c

index 17d9bfb9360ddd15345a73690e707e3a8f0fb3dd..d9e2745827067df91a58024c3aeb534c751612b9 100644 (file)
@@ -32,7 +32,7 @@ THE SOFTWARE.
 #define CONFIG_NO 1
 #define CONFIG_YES 2
 
-/* babeld interface informations */
+/* babeld interface information */
 struct babel_interface {
     unsigned short flags;                     /* see below */
     unsigned short cost;
index d02d86f77b2a15befc6fb4e029f69e2ce715ce96..f26d3a8872a3695de40774b204a9355ae198ff18 100644 (file)
@@ -385,7 +385,7 @@ show_babel_main_configuration (struct vty *vty)
     vty_out (vty,
             "state file              = %s\n"
             "configuration file      = %s\n"
-            "protocol informations:\n"
+            "protocol information:\n"
             "  multicast address     = %s\n"
             "  port                  = %d\n"
             "vty address             = %s\n"
index 9523cca87ecde8b4cc9a9f69cde74e2c5d1f4c30..65a46bb9657b797b9a9a2ac9d39b34e6144cfaad 100644 (file)
@@ -1697,7 +1697,7 @@ int bgp_mp_reach_parse(struct bgp_attr_parser_args *args,
                                 * - for consistency in rx processing
                                 *
                                 * The following comment is to signal GCC this intention
-                                * and supress the warning
+                                * and suppress the warning
                                 */
        /* FALLTHRU */
        case BGP_ATTR_NHLEN_IPV4:
@@ -2624,7 +2624,7 @@ bgp_attr_parse_ret_t bgp_attr_parse(struct peer *peer, struct attr *attr,
                        return ret;
                }
 
-               /* If hard error occured immediately return to the caller. */
+               /* If hard error occurred immediately return to the caller. */
                if (ret == BGP_ATTR_PARSE_ERROR) {
                        flog_warn(EC_BGP_ATTRIBUTE_PARSE_ERROR,
                                  "%s: Attribute %s, parse error", peer->host,
index 86cee39a621cd9839de6a8ae766f0a03d954beb1..cf085e46fb1f1eaacc66d38217f85951b0d51d71 100644 (file)
@@ -689,7 +689,7 @@ int bgp_show_dampening_parameters(struct vty *vty, afi_t afi, safi_t safi)
                vty_out(vty, "Suppress penalty: %d\n", damp->suppress_value);
                vty_out(vty, "Max suppress time: %lld min\n",
                        (long long)damp->max_suppress_time / 60);
-               vty_out(vty, "Max supress penalty: %u\n", damp->ceiling);
+               vty_out(vty, "Max suppress penalty: %u\n", damp->ceiling);
                vty_out(vty, "\n");
        } else
                vty_out(vty, "dampening not enabled for %s\n",
index 7cebd0e484381a63b8661d317eb1344c8a9e9f1c..753ee6baf10043dad5d3966d66393c0d48091a7e 100644 (file)
@@ -171,7 +171,7 @@ static struct log_ref ferr_bgp_warn[] = {
        },
        {
                .code = EC_BGP_CAPABILITY_VENDOR,
-               .title = "BGP has recieved capability data specific to a particular vendor",
+               .title = "BGP has received capability data specific to a particular vendor",
                .description = "BGP has received a capability that is vendor specific and as such we have no knowledge of how to use this capability in FRR",
                .suggestion = "On peer turn off this feature"
        },
@@ -197,43 +197,43 @@ static struct log_ref ferr_bgp_err[] = {
                .code = EC_BGP_ATTR_FLAG,
                .title = "BGP attribute flag is incorrect",
                .description = "BGP attribute flag is set to the wrong value (Optional/Transitive/Partial)",
-               .suggestion = "Determine the soure of the attribute and determine why the attribute flag has been set incorrectly"
+               .suggestion = "Determine the source of the attribute and determine why the attribute flag has been set incorrectly"
        },
        {
                .code = EC_BGP_ATTR_LEN,
                .title = "BGP attribute length is incorrect",
                .description = "BGP attribute length is incorrect",
-               .suggestion = "Determine the soure of the attribute and determine why the attribute length has been set incorrectly"
+               .suggestion = "Determine the source of the attribute and determine why the attribute length has been set incorrectly"
        },
        {
                .code = EC_BGP_ATTR_ORIGIN,
                .title = "BGP attribute origin value invalid",
                .description = "BGP attribute origin value is invalid",
-               .suggestion = "Determine the soure of the attribute and determine why the origin attribute has been set incorrectly"
+               .suggestion = "Determine the source of the attribute and determine why the origin attribute has been set incorrectly"
        },
        {
                .code = EC_BGP_ATTR_MAL_AS_PATH,
                .title = "BGP as path is invalid",
                .description = "BGP as path has been malformed",
-               .suggestion = "Determine the soure of the update and determine why the as path has been set incorrectly"
+               .suggestion = "Determine the source of the update and determine why the as path has been set incorrectly"
        },
        {
                .code = EC_BGP_ATTR_FIRST_AS,
                .title = "BGP as path first as is invalid",
                .description = "BGP update has invalid first as in as path",
-               .suggestion = "Determine the soure of the update and determine why the as path first as value has been set incorrectly"
+               .suggestion = "Determine the source of the update and determine why the as path first as value has been set incorrectly"
        },
        {
                .code = EC_BGP_ATTR_PMSI_TYPE,
                .title = "BGP PMSI tunnel attribute type is invalid",
                .description = "BGP update has invalid type for PMSI tunnel",
-               .suggestion = "Determine the soure of the update and determine why the PMSI tunnel attribute type has been set incorrectly"
+               .suggestion = "Determine the source of the update and determine why the PMSI tunnel attribute type has been set incorrectly"
        },
        {
                .code = EC_BGP_ATTR_PMSI_LEN,
                .title = "BGP PMSI tunnel attribute length is invalid",
                .description = "BGP update has invalid length for PMSI tunnel",
-               .suggestion = "Determine the soure of the update and determine why the PMSI tunnel attribute length has been set incorrectly"
+               .suggestion = "Determine the source of the update and determine why the PMSI tunnel attribute length has been set incorrectly"
        },
        {
                .code = EC_BGP_PEER_GROUP,
@@ -269,7 +269,7 @@ static struct log_ref ferr_bgp_err[] = {
                .code = EC_BGP_JSON_MEM_ERROR,
                .title = "BGP unable to allocate memory for JSON output",
                .description = "BGP attempted to generate JSON output and was unable to allocate the memory required",
-               .suggestion = "Ensure that the device has adequate memory to suport the required functions"
+               .suggestion = "Ensure that the device has adequate memory to support the required functions"
        },
        {
                .code = EC_BGP_UPDGRP_ATTR_LEN,
index b67d93d4f5b3978daf761301977d065c5de2db20..574ece8cc53b6ae7d21af6edb6c09b10abe96aab 100644 (file)
@@ -1449,7 +1449,7 @@ static int update_evpn_type5_route_entry(struct bgp *bgp_def,
        }
 
        /*
-        * create a new route entry if one doesnt exist.
+        * create a new route entry if one doesn't exist.
         * Otherwise see if route attr has changed
         */
        if (!local_pi) {
@@ -5288,7 +5288,7 @@ int bgp_evpn_local_l3vni_add(vni_t l3vni, vrf_id_t vrf_id, struct ethaddr *rmac,
        }
        as = bgp_def->as;
 
-       /* if the BGP vrf instance doesnt exist - create one */
+       /* if the BGP vrf instance doesn't exist - create one */
        bgp_vrf = bgp_lookup_by_name(vrf_id_to_name(vrf_id));
        if (!bgp_vrf) {
 
index 90c9db3dfe0420db7967063e3cd039fc61e2c93f..29f9f64cca0d8c2bceef5fae6dd99112efa5a7dd 100644 (file)
@@ -3999,7 +3999,7 @@ DEFUN(test_withdraw_evpn_type4_route,
        }
 
        if (!bgp->peer_self) {
-               vty_out(vty, "%%BGP instance doesnt have self peer\n");
+               vty_out(vty, "%%BGP instance doesn't have self peer\n");
                return CMD_WARNING;
        }
 
index d17426e3ff703282c885dee3d51d0c829ee63c26..8aa35eddfcccede59b8b987cce51e98361bc0fe1 100644 (file)
@@ -931,7 +931,7 @@ static void bgp_update_delay_process_status_change(struct peer *peer)
        }
 }
 
-/* Called after event occured, this function change status and reset
+/* Called after event occurred, this function change status and reset
    read/write and timer thread. */
 void bgp_fsm_change_status(struct peer *peer, int status)
 {
index 96f3c8324f211f6fa2b7fbfda8e7770fa6fedf12..73a07c8232290e6b8545d11e12408c4f869dd810 100644 (file)
@@ -272,7 +272,7 @@ static void bgp_update_explicit_eors(struct peer *peer)
                                           PEER_STATUS_EOR_RECEIVED)) {
                                if (bgp_debug_neighbor_events(peer))
                                        zlog_debug(
-                                               "   afi %d safi %d didnt receive EOR",
+                                               "   afi %d safi %d didn't receive EOR",
                                                afi, safi);
                                return;
                        }
index 379e44cd5db74ec4f5aa5047030738ff277e0657..c20b404f19530fc08e967ef346a1ffc537965cd0 100644 (file)
@@ -8306,7 +8306,6 @@ static int bgp_show_table(struct vty *vty, struct bgp *bgp, safi_t safi,
        unsigned long output_count = 0;
        unsigned long total_count = 0;
        struct prefix *p;
-       char buf[BUFSIZ];
        char buf2[BUFSIZ];
        json_object *json_paths = NULL;
        int first = 1;
@@ -8527,14 +8526,32 @@ static int bgp_show_table(struct vty *vty, struct bgp *bgp, safi_t safi,
                                continue;
 
                        p = &rn->p;
-                       sprintf(buf2, "%s/%d",
-                               inet_ntop(p->family, &p->u.prefix, buf, BUFSIZ),
-                               p->prefixlen);
-                       if (first)
-                               vty_out(vty, "\"%s\": ", buf2);
-                       else
-                               vty_out(vty, ",\"%s\": ", buf2);
-
+                       /* encode prefix */
+                       if (p->family == AF_FLOWSPEC) {
+                               char retstr[BGP_FLOWSPEC_STRING_DISPLAY_MAX];
+
+                               bgp_fs_nlri_get_string((unsigned char *)
+                                                      p->u.prefix_flowspec.ptr,
+                                                      p->u.prefix_flowspec
+                                                      .prefixlen,
+                                                      retstr,
+                                                      NLRI_STRING_FORMAT_MIN,
+                                                      NULL);
+                               if (first)
+                                       vty_out(vty, "\"%s/%d\": ",
+                                               retstr,
+                                               p->u.prefix_flowspec.prefixlen);
+                               else
+                                       vty_out(vty, ",\"%s/%d\": ",
+                                               retstr,
+                                               p->u.prefix_flowspec.prefixlen);
+                       } else {
+                               prefix2str(p, buf2, sizeof(buf2));
+                               if (first)
+                                       vty_out(vty, "\"%s\": ", buf2);
+                               else
+                                       vty_out(vty, ",\"%s\": ", buf2);
+                       }
                        vty_out(vty, "%s",
                                json_object_to_json_string(json_paths));
                        json_object_free(json_paths);
index 1f81dad6497aba043b95235f7aec3b117db89861..81b782c2b02b602e02f1ca7badee8e2400d47719 100644 (file)
@@ -664,7 +664,8 @@ void subgroup_default_originate(struct update_subgroup *subgrp, int withdraw)
 {
        struct bgp *bgp;
        struct attr attr;
-       struct bgp_path_info *info, init_info, tmp_info;
+       struct aspath *aspath;
+       struct bgp_path_info tmp_info;
        struct prefix p;
        struct peer *from;
        struct bgp_node *rn;
@@ -688,59 +689,46 @@ void subgroup_default_originate(struct update_subgroup *subgrp, int withdraw)
        from = bgp->peer_self;
 
        bgp_attr_default_set(&attr, BGP_ORIGIN_IGP);
+       aspath = attr.aspath;
+
        attr.local_pref = bgp->default_local_pref;
 
+       memset(&p, 0, sizeof(p));
+       p.family = afi2family(afi);
+       p.prefixlen = 0;
+
        if ((afi == AFI_IP6) || peer_cap_enhe(peer, afi, safi)) {
-               /* IPv6 global nexthop must be included.
-                */
+               /* IPv6 global nexthop must be included. */
                attr.mp_nexthop_len = BGP_ATTR_NHLEN_IPV6_GLOBAL;
 
-               /* If the peer is on shared nextwork and
-                * we have link-local nexthop set it. */
+               /* If the peer is on shared nextwork and we have link-local
+                  nexthop set it. */
                if (peer->shared_network
                    && !IN6_IS_ADDR_UNSPECIFIED(&peer->nexthop.v6_local))
                        attr.mp_nexthop_len = BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL;
        }
-       init_info.attr = &attr;
-       info = &init_info;
-       bgp_attr_intern(info->attr);
-
-       memset(&p, 0, sizeof(p));
-       p.family = afi2family(afi);
-       p.prefixlen = 0;
 
        if (peer->default_rmap[afi][safi].name) {
                SET_FLAG(bgp->peer_self->rmap_type, PEER_RMAP_TYPE_DEFAULT);
                for (rn = bgp_table_top(bgp->rib[afi][safi]); rn;
                     rn = bgp_route_next(rn)) {
                        for (ri = rn->info; ri; ri = ri->next) {
+                               struct attr dummy_attr;
+
+                               /* Provide dummy so the route-map can't modify
+                                * the attributes */
+                               bgp_attr_dup(&dummy_attr, ri->attr);
                                tmp_info.peer = ri->peer;
-                               tmp_info.attr = ri->attr;
-
-                               /* Reset attributes every time to avoid \
-                                * unexpected as-path prepends */
-                               bgp_attr_default_set(tmp_info.attr,
-                                                    BGP_ORIGIN_IGP);
-
-                               if ((afi == AFI_IP6)
-                                   || peer_cap_enhe(peer, afi, safi)) {
-                                       tmp_info.attr->mp_nexthop_len =
-                                               BGP_ATTR_NHLEN_IPV6_GLOBAL;
-
-                                       if (peer->shared_network
-                                           && !IN6_IS_ADDR_UNSPECIFIED(
-                                                      &peer->nexthop.v6_local))
-                                               tmp_info.attr->mp_nexthop_len =
-                                                       BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL;
-                               }
+                               tmp_info.attr = &dummy_attr;
 
                                ret = route_map_apply(
                                        peer->default_rmap[afi][safi].map,
                                        &rn->p, RMAP_BGP, &tmp_info);
 
-                               info = &tmp_info;
-                               bgp_attr_intern(info->attr);
-
+                               /* The route map might have set attributes. If
+                                * we don't flush them
+                                * here, they will be leaked. */
+                               bgp_attr_flush(&dummy_attr);
                                if (ret != RMAP_DENYMATCH)
                                        break;
                        }
@@ -762,13 +750,12 @@ void subgroup_default_originate(struct update_subgroup *subgrp, int withdraw)
                                SUBGRP_STATUS_DEFAULT_ORIGINATE)) {
 
                        if (bgp_flag_check(bgp, BGP_FLAG_GRACEFUL_SHUTDOWN)) {
-                               bgp_attr_add_gshut_community(info->attr);
+                               bgp_attr_add_gshut_community(&attr);
                        }
 
                        SET_FLAG(subgrp->sflags,
                                 SUBGRP_STATUS_DEFAULT_ORIGINATE);
-                       subgroup_default_update_packet(subgrp, info->attr,
-                                                      from);
+                       subgroup_default_update_packet(subgrp, &attr, from);
 
                        /* The 'neighbor x.x.x.x default-originate' default will
                         * act as an
@@ -788,7 +775,8 @@ void subgroup_default_originate(struct update_subgroup *subgrp, int withdraw)
                                BGP_ADDPATH_TX_ID_FOR_DEFAULT_ORIGINATE);
                }
        }
-       aspath_unintern(&info->attr->aspath);
+
+       aspath_unintern(&aspath);
 }
 
 /*
index 3950e2f18ff6d75850248038b5d26ad0f02d6af1..c4fcea948ff7f40167ddddc779c2b7ce82ba9f37 100644 (file)
@@ -1123,6 +1123,8 @@ void subgroup_default_update_packet(struct update_subgroup *subgrp,
                        snprintf(tx_id_buf, sizeof(tx_id_buf),
                                 " with addpath ID %u",
                                 BGP_ADDPATH_TX_ID_FOR_DEFAULT_ORIGINATE);
+               else
+                       tx_id_buf[0] = '\0';
 
                zlog_debug("u%" PRIu64 ":s%" PRIu64 " send UPDATE %s%s %s",
                           (SUBGRP_UPDGRP(subgrp))->id, subgrp->id,
index a1c50a720f7c6f69b3d3d1d32acc6a7e19a74c3b..ecbe33ff8c51759ed393174add66746990638524 100644 (file)
@@ -2301,7 +2301,7 @@ DEFUN (bgp_default_show_hostname,
        "bgp default show-hostname",
        "BGP specific commands\n"
        "Configure BGP defaults\n"
-       "Show hostname in certain command ouputs\n")
+       "Show hostname in certain command outputs\n")
 {
        VTY_DECLVAR_CONTEXT(bgp, bgp);
        bgp_flag_set(bgp, BGP_FLAG_SHOW_HOSTNAME);
@@ -2314,7 +2314,7 @@ DEFUN (no_bgp_default_show_hostname,
        NO_STR
        "BGP specific commands\n"
        "Configure BGP defaults\n"
-       "Show hostname in certain command ouputs\n")
+       "Show hostname in certain command outputs\n")
 {
        VTY_DECLVAR_CONTEXT(bgp, bgp);
        bgp_flag_unset(bgp, BGP_FLAG_SHOW_HOSTNAME);
@@ -6016,7 +6016,7 @@ DEFUN (neighbor_allowas_in,
        NEIGHBOR_STR
        NEIGHBOR_ADDR_STR2
        "Accept as-path with my AS present in it\n"
-       "Number of occurances of AS number\n"
+       "Number of occurences 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;
@@ -6050,7 +6050,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 occurances of AS number\n"
+       "Number of occurences 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,
@@ -6060,7 +6060,7 @@ DEFUN (no_neighbor_allowas_in,
        NEIGHBOR_STR
        NEIGHBOR_ADDR_STR2
        "allow local ASN appears in aspath attribute\n"
-       "Number of occurances of AS number\n"
+       "Number of occurences 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;
@@ -6082,7 +6082,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 occurances of AS number\n"
+       "Number of occurences 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,
@@ -9607,7 +9607,7 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json,
                                                                json_object_string_add(
                                                                        json_nxt,
                                                                        print_store,
-                                                                       "recieved");
+                                                                       "received");
                                                        }
                                                }
                                                json_object_object_add(
@@ -10215,7 +10215,7 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json,
                        json_object_object_add(
                                json_neigh, "gracefulRestartInfo", json_grace);
                } else {
-                       vty_out(vty, "  Graceful restart informations:\n");
+                       vty_out(vty, "  Graceful restart information:\n");
                        if (p->status == Established) {
                                vty_out(vty, "    End-of-RIB send: ");
                                FOREACH_AFI_SAFI (afi, safi) {
index 750b9aef138695d974e7100fe27b11acc3f718fe..1dc9122ac4b5a7c271a1798241f82d204b1f729a 100644 (file)
@@ -17,7 +17,7 @@
             # open, as well as the daemons, so always signal the daemons.
             # It's safe, a NOP if (only) syslog is being used.
             for i in babeld bgpd eigrpd isisd ldpd nhrpd ospf6d ospfd \
-                pimd ripd ripngd zebra staticd ; do
+                pimd ripd ripngd zebra staticd fabricd; do
                 if [ -e /var/run/frr/$i.pid ] ; then
                     pids="$pids $(cat /var/run/frr/$i.pid)"
                 fi
index d4bb920b464cecc1ef79951f5c6a96f9851fb003..f5aa972304242fafeec4a5874f3cf4c285839521 100644 (file)
@@ -13,3 +13,4 @@ doc/manpages/_build/man/zebra.8
 doc/manpages/_build/man/isisd.8
 doc/manpages/_build/man/watchfrr.8
 doc/manpages/_build/man/mtracebis.8
+doc/manpages/_build/man/fabricd.8
index ac35ecd950816ede2e93028156af2c003d99e94b..43966c83478aeb629d232076ed58736763fcb4ea 100644 (file)
@@ -6,7 +6,7 @@ set -e
 
 # modify config file to enable all daemons and copy config files
 CONFIG_FILE=/etc/frr/daemons
-DAEMONS=("zebra" "bgpd" "ospfd" "ospf6d" "ripd" "ripngd" "isisd" "pimd")
+DAEMONS=("zebra" "bgpd" "ospfd" "ospf6d" "ripd" "ripngd" "isisd" "pimd" "fabricd")
 
 for daemon in "${DAEMONS[@]}"
 do
index 74d3eb7bbdccb605e79cf65151c4e08cbc11a5f2..a5977a6ebbe51b8ff5ba775b7185083b4562e5d0 100644 (file)
@@ -136,7 +136,7 @@ These following options control the daemon's VTY (interactive command line) inte
 
    NB: Unlike the other options, this option specifies a directory, not a full path.
 
-   This option is primarily used by the SNAP packaging system, its semantics may change.  It should not be neccessary in most other scenarios.
+   This option is primarily used by the SNAP packaging system, its semantics may change.  It should not be necessary in most other scenarios.
 
 MODULE LOADING
 --------------
index a8a9301588f1181eafc429cabf9c37d6f56e6fb2..cfb368bf4455ae8f588b6b12383a4a6125084025 100644 (file)
@@ -33,7 +33,7 @@ OPTIONS available for the |DAEMON| command:
 
    Set netlink receive buffer size. There are cases where zebra daemon can't handle flood of netlink messages from kernel. If you ever see "recvmsg overrun" messages in zebra log, you are in trouble.
 
-   Solution is to increase receive buffer of netlink socket. Note that kernel < 2.6.14 doesn't allow to increase it over maximum value defined in /proc/sys/net/core/rmem_max. If you want to do it, you have to increase maximum before starting zebra.
+   Solution is to increase receive buffer of netlink socket. Note that kernel < 2.6.14 doesn't allow increasing it over maximum value defined in /proc/sys/net/core/rmem_max. If you want to do it, you have to increase maximum before starting zebra.
 
    Note that this affects Linux only.
 
index 3d84c82179ecd31a95c2883b131f3b55c400c8a8..895a141e4a146c140b3fc5b45e6d047222bfccdf 100644 (file)
@@ -152,7 +152,7 @@ enum eigrp_fsm_states {
 enum eigrp_fsm_events {
        /*
         * Input event other than query from succ,
-        * FC is not satisified
+        * FC is not satisfied
         */
        EIGRP_FSM_EVENT_NQ_FCN,
 
@@ -171,7 +171,7 @@ enum eigrp_fsm_events {
        /* Query from succ while in active state */
        EIGRP_FSM_EVENT_QACT,
 
-       /* last reply, FC not satisified */
+       /* last reply, FC not satisfied */
        EIGRP_FSM_EVENT_LR_FCN,
 
        /*
index bbe2b88223f3cb013c7074c310caf30ae94f46dd..27e02630a655d91c7d05912af872031250f77f26 100644 (file)
@@ -228,7 +228,7 @@ void show_ip_eigrp_interface_detail(struct vty *vty, struct eigrp *eigrp,
                "Un/reliable mcasts: ", 0, "/", 0, "Un/reliable ucasts: ", 0,
                "/", 0);
        vty_out(vty, "%-2s %s %d %s %d %s %d \n", "", "Mcast exceptions: ", 0,
-               "  CR packets: ", 0, "  ACKs supressed: ", 0);
+               "  CR packets: ", 0, "  ACKs suppressed: ", 0);
        vty_out(vty, "%-2s %s %d %s %d \n", "", "Retransmissions sent: ", 0,
                "Out-of-sequence rcvd: ", 0);
        vty_out(vty, "%-2s %s %s %s \n", "", "Authentication mode is ", "not",
index f955e6df0f7fb917945a34780df728842d9848d4..374114cf559dd279fa4935c895d8e8dddb756df9 100644 (file)
@@ -222,9 +222,9 @@ static const char *fsm_state2str(enum eigrp_fsm_events event)
        case EIGRP_FSM_EVENT_LR:
                return "Last Reply Event";
        case EIGRP_FSM_EVENT_Q_FCN:
-               return "Query Event Feasability not satisified";
+               return "Query Event Feasability not satisfied";
        case EIGRP_FSM_EVENT_LR_FCS:
-               return "Last Reply Event Feasability satisified";
+               return "Last Reply Event Feasability satisfied";
        case EIGRP_FSM_EVENT_DINC:
                return "Distance Increase Event";
        case EIGRP_FSM_EVENT_QACT:
index 558bc4276bb892c7a7a1677b1ffdd49a02e8cbe7..bb090f42edda55fef18c9956f2d8331108d1b2fb 100644 (file)
@@ -59,8 +59,7 @@
 #include "isisd/fabricd.h"
 #include "isisd/isis_tx_queue.h"
 
-static int lsp_l1_refresh(struct thread *thread);
-static int lsp_l2_refresh(struct thread *thread);
+static int lsp_refresh(struct thread *thread);
 static int lsp_l1_refresh_pseudo(struct thread *thread);
 static int lsp_l2_refresh_pseudo(struct thread *thread);
 
@@ -1251,12 +1250,9 @@ int lsp_generate(struct isis_area *area, int level)
 
        THREAD_TIMER_OFF(area->t_lsp_refresh[level - 1]);
        area->lsp_regenerate_pending[level - 1] = 0;
-       if (level == IS_LEVEL_1)
-               thread_add_timer(master, lsp_l1_refresh, area, refresh_time,
-                                &area->t_lsp_refresh[level - 1]);
-       else if (level == IS_LEVEL_2)
-               thread_add_timer(master, lsp_l2_refresh, area, refresh_time,
-                                &area->t_lsp_refresh[level - 1]);
+       thread_add_timer(master, lsp_refresh,
+                        &area->lsp_refresh_arg[level - 1], refresh_time,
+                        &area->t_lsp_refresh[level - 1]);
 
        if (isis->debugs & DEBUG_UPDATE_PACKETS) {
                zlog_debug("ISIS-Upd (%s): Building L%d LSP %s, len %" PRIu16
@@ -1323,12 +1319,9 @@ static int lsp_regenerate(struct isis_area *area, int level)
        lsp_seqno_update(lsp);
 
        refresh_time = lsp_refresh_time(lsp, rem_lifetime);
-       if (level == IS_LEVEL_1)
-               thread_add_timer(master, lsp_l1_refresh, area, refresh_time,
-                                &area->t_lsp_refresh[level - 1]);
-       else if (level == IS_LEVEL_2)
-               thread_add_timer(master, lsp_l2_refresh, area, refresh_time,
-                                &area->t_lsp_refresh[level - 1]);
+       thread_add_timer(master, lsp_refresh,
+                        &area->lsp_refresh_arg[level - 1], refresh_time,
+                        &area->t_lsp_refresh[level - 1]);
        area->lsp_regenerate_pending[level - 1] = 0;
 
        if (isis->debugs & DEBUG_UPDATE_PACKETS) {
@@ -1350,45 +1343,42 @@ static int lsp_regenerate(struct isis_area *area, int level)
 /*
  * Something has changed or periodic refresh -> regenerate LSP
  */
-static int lsp_l1_refresh(struct thread *thread)
+static int lsp_refresh(struct thread *thread)
 {
-       struct isis_area *area;
+       struct lsp_refresh_arg *arg = THREAD_ARG(thread);
 
-       area = THREAD_ARG(thread);
-       assert(area);
-
-       area->t_lsp_refresh[0] = NULL;
-       area->lsp_regenerate_pending[0] = 0;
-
-       if ((area->is_type & IS_LEVEL_1) == 0)
-               return ISIS_ERROR;
-
-       sched_debug(
-               "ISIS (%s): LSP L1 refresh timer expired. Refreshing LSP...",
-               area->area_tag);
-       return lsp_regenerate(area, IS_LEVEL_1);
-}
+       assert(arg);
 
-static int lsp_l2_refresh(struct thread *thread)
-{
-       struct isis_area *area;
+       struct isis_area *area = arg->area;
 
-       area = THREAD_ARG(thread);
        assert(area);
 
-       area->t_lsp_refresh[1] = NULL;
-       area->lsp_regenerate_pending[1] = 0;
+       int level = arg->level;
 
-       if ((area->is_type & IS_LEVEL_2) == 0)
+       area->t_lsp_refresh[level - 1] = NULL;
+       area->lsp_regenerate_pending[level - 1] = 0;
+
+       if ((area->is_type & level) == 0)
                return ISIS_ERROR;
 
+       if (monotime_since(&area->last_lsp_refresh_event[level - 1], NULL) < 50000L) {
+               sched_debug("ISIS (%s): Still unstable, postpone LSP L%d refresh",
+                           area->area_tag, level);
+               _lsp_regenerate_schedule(area, level, 0, false,
+                                        __func__, __FILE__, __LINE__);
+               return 0;
+       }
+
        sched_debug(
-               "ISIS (%s): LSP L2 refresh timer expired. Refreshing LSP...",
-               area->area_tag);
-       return lsp_regenerate(area, IS_LEVEL_2);
+               "ISIS (%s): LSP L%d refresh timer expired. Refreshing LSP...",
+               area->area_tag, level);
+       return lsp_regenerate(area, level);
 }
 
-int lsp_regenerate_schedule(struct isis_area *area, int level, int all_pseudo)
+int _lsp_regenerate_schedule(struct isis_area *area, int level,
+                            int all_pseudo, bool postpone,
+                            const char *func, const char *file,
+                            int line)
 {
        struct isis_lsp *lsp;
        uint8_t id[ISIS_SYS_ID_LEN + 2];
@@ -1402,9 +1392,11 @@ int lsp_regenerate_schedule(struct isis_area *area, int level, int all_pseudo)
                return ISIS_ERROR;
 
        sched_debug(
-               "ISIS (%s): Scheduling regeneration of %s LSPs, %sincluding PSNs",
+               "ISIS (%s): Scheduling regeneration of %s LSPs, %sincluding PSNs"
+               " Caller: %s %s:%d",
                area->area_tag, circuit_t2string(level),
-               all_pseudo ? "" : "not ");
+               all_pseudo ? "" : "not ",
+               func, file, line);
 
        memcpy(id, isis->sysid, ISIS_SYS_ID_LEN);
        LSP_PSEUDO_ID(id) = LSP_FRAGMENT(id) = 0;
@@ -1414,6 +1406,10 @@ int lsp_regenerate_schedule(struct isis_area *area, int level, int all_pseudo)
                if (!((level & lvl) && (area->is_type & lvl)))
                        continue;
 
+               if (postpone) {
+                       monotime(&area->last_lsp_refresh_event[lvl - 1]);
+               }
+
                sched_debug(
                        "ISIS (%s): Checking whether L%d needs to be scheduled",
                        area->area_tag, lvl);
@@ -1468,15 +1464,10 @@ int lsp_regenerate_schedule(struct isis_area *area, int level, int all_pseudo)
                }
 
                area->lsp_regenerate_pending[lvl - 1] = 1;
-               if (lvl == IS_LEVEL_1) {
-                       thread_add_timer_msec(master, lsp_l1_refresh, area,
-                                             timeout,
-                                             &area->t_lsp_refresh[lvl - 1]);
-               } else if (lvl == IS_LEVEL_2) {
-                       thread_add_timer_msec(master, lsp_l2_refresh, area,
-                                             timeout,
-                                             &area->t_lsp_refresh[lvl - 1]);
-               }
+               thread_add_timer_msec(master, lsp_refresh,
+                                     &area->lsp_refresh_arg[lvl - 1],
+                                     timeout,
+                                     &area->t_lsp_refresh[lvl - 1]);
        }
 
        if (all_pseudo) {
index 4beee10081d2cfe5d82b118b62ad423a19228064..2b45e6994ce1179887156cc90233e90876a0e531 100644 (file)
@@ -54,7 +54,12 @@ void lsp_db_destroy(dict_t *lspdb);
 int lsp_tick(struct thread *thread);
 
 int lsp_generate(struct isis_area *area, int level);
-int lsp_regenerate_schedule(struct isis_area *area, int level, int all_pseudo);
+#define lsp_regenerate_schedule(area, level, all_pseudo) \
+       _lsp_regenerate_schedule((area), (level), (all_pseudo), true, \
+                                __func__, __FILE__, __LINE__)
+int _lsp_regenerate_schedule(struct isis_area *area, int level,
+                            int all_pseudo, bool postpone,
+                            const char *func, const char *file, int line);
 int lsp_generate_pseudo(struct isis_circuit *circuit, int level);
 int lsp_regenerate_schedule_pseudo(struct isis_circuit *circuit, int level);
 
index 1440a3becf65ff6d18cb97e600782ef50532b3d8..b6f751463a7ce187478f50f557ba319a456c0213 100644 (file)
@@ -887,7 +887,7 @@ static int isis_spf_preload_tent(struct isis_spftree *spftree,
                                case ISIS_SYSTYPE_UNKNOWN:
                                default:
                                        zlog_warn(
-                                               "isis_spf_preload_tent unknow adj type");
+                                               "isis_spf_preload_tent unknown adj type");
                                }
                        }
                        list_delete(&adj_list);
@@ -1248,7 +1248,8 @@ static struct isis_spf_run *isis_run_spf_arg(struct isis_area *area, int level)
        return run;
 }
 
-int isis_spf_schedule(struct isis_area *area, int level)
+int _isis_spf_schedule(struct isis_area *area, int level,
+                      const char *func, const char *file, int line)
 {
        struct isis_spftree *spftree = area->spftree[SPFTREE_IPV4][level - 1];
        time_t now = monotime(NULL);
@@ -1257,10 +1258,12 @@ int isis_spf_schedule(struct isis_area *area, int level)
        assert(diff >= 0);
        assert(area->is_type & level);
 
-       if (isis->debugs & DEBUG_SPF_EVENTS)
+       if (isis->debugs & DEBUG_SPF_EVENTS) {
                zlog_debug(
-                       "ISIS-Spf (%s) L%d SPF schedule called, lastrun %d sec ago",
-                       area->area_tag, level, diff);
+                       "ISIS-Spf (%s) L%d SPF schedule called, lastrun %d sec ago"
+                       " Caller: %s %s:%d",
+                       area->area_tag, level, diff, func, file, line);
+       }
 
        if (area->spf_delay_ietf[level - 1]) {
                /* Need to call schedule function also if spf delay is running
index f4db98cfed532af958e56671be8aba600e97ca07..8bf9c9978a1924388e08a196589269da8f6b6a05 100644 (file)
@@ -34,7 +34,11 @@ void isis_spftree_del(struct isis_spftree *spftree);
 void spftree_area_init(struct isis_area *area);
 void spftree_area_del(struct isis_area *area);
 void spftree_area_adj_del(struct isis_area *area, struct isis_adjacency *adj);
-int isis_spf_schedule(struct isis_area *area, int level);
+#define isis_spf_schedule(area, level) \
+       _isis_spf_schedule((area), (level), __func__, \
+                          __FILE__, __LINE__)
+int _isis_spf_schedule(struct isis_area *area, int level,
+                      const char *func, const char *file, int line);
 void isis_spf_cmds_init(void);
 void isis_spf_print(struct isis_spftree *spftree, struct vty *vty);
 struct isis_spftree *isis_run_hopcount_spf(struct isis_area *area,
index 94e6a63855b30758d4b6d107efb68f1624a99b5e..54bdbf3eb3ef66115d91d4c1ffa335c5471eefad 100644 (file)
@@ -160,6 +160,13 @@ struct isis_area *isis_area_create(const char *area_tag)
 
        if (fabricd)
                area->fabricd = fabricd_new(area);
+
+       area->lsp_refresh_arg[0].area = area;
+       area->lsp_refresh_arg[0].level = IS_LEVEL_1;
+       area->lsp_refresh_arg[1].area = area;
+       area->lsp_refresh_arg[1].level = IS_LEVEL_2;
+
+
        QOBJ_REG(area, isis_area);
 
        return area;
index 7572f551743758ffc6f09a95cedf2e360f8cd733..51b359aad462dfd082f7d741bff7e82cdbf7a705 100644 (file)
@@ -90,6 +90,11 @@ enum spf_tree_id {
        SPFTREE_COUNT
 };
 
+struct lsp_refresh_arg {
+       struct isis_area *area;
+       int level;
+};
+
 struct isis_area {
        struct isis *isis;                             /* back pointer */
        dict_t *lspdb[ISIS_LEVELS];                    /* link-state dbs */
@@ -100,6 +105,7 @@ struct isis_area {
        struct flags flags;
        struct thread *t_tick; /* LSP walker */
        struct thread *t_lsp_refresh[ISIS_LEVELS];
+       struct timeval last_lsp_refresh_event[ISIS_LEVELS];
        /* t_lsp_refresh is used in two ways:
         * a) regular refresh of LSPs
         * b) (possibly throttled) updates to LSPs
@@ -160,6 +166,8 @@ struct isis_area {
                                                            parameters*/
        struct thread *spf_timer[ISIS_LEVELS];
 
+       struct lsp_refresh_arg lsp_refresh_arg[ISIS_LEVELS];
+
        QOBJ_FIELDS
 };
 DECLARE_QOBJ_TYPE(isis_area)
index 8eed0899000c434469be782e488cf8f3492d3688..c24e1917ccf7b974cf859caf24d01b6930d8758b 100644 (file)
@@ -156,7 +156,7 @@ DEFPY  (ldp_dual_stack_transport_connection_prefer_ipv4,
        NO_STR
        "Configure dual stack parameters\n"
        "Configure TCP transport parameters\n"
-       "Configure prefered address family for TCP transport connection with neighbor\n"
+       "Configure preferred address family for TCP transport connection with neighbor\n"
        "IPv4\n")
 {
        return (ldp_vty_trans_pref_ipv4(vty, no));
index 12f9cb0ccf94d580d5b1e259c5167be2d52564c8..b4d74f1950ec69b78ea1b7a1ec2ace93471ee69b 100644 (file)
@@ -259,7 +259,7 @@ embedscope(struct sockaddr_in6 *sin6)
        if (IN6_IS_SCOPE_EMBED(&sin6->sin6_addr)) {
                memcpy(&tmp16, &sin6->sin6_addr.s6_addr[2], sizeof(tmp16));
                if (tmp16 != 0) {
-                       log_warnx("%s: address %s already has embeded scope %u",
+                       log_warnx("%s: address %s already has embedded scope %u",
                            __func__, log_sockaddr(sin6), ntohs(tmp16));
                }
                tmp16 = htons(sin6->sin6_scope_id);
index 1dfe583caf7743744a35c49362e7c5abe6d1015b..178c203f5e9f64ca66fdcbe617a95e8723ef570f 100644 (file)
--- a/lib/bfd.c
+++ b/lib/bfd.c
@@ -134,7 +134,7 @@ void bfd_peer_sendmsg(struct zclient *zclient, struct bfd_info *bfd_info,
        int ret;
        int len;
 
-       /* Individual reg/dereg messages are supressed during shutdown. */
+       /* Individual reg/dereg messages are suppressed during shutdown. */
        if (CHECK_FLAG(bfd_gbl.flags, BFD_GBL_FLAG_IN_SHUTDOWN)) {
                if (bfd_debug)
                        zlog_debug(
index 839c37b10272f98067402ff1d5b8d63e32c27c7f..127e1a0a0ad2a82e2016f4eba20b919b4871921c 100644 (file)
@@ -1323,7 +1323,9 @@ int command_config_read_one_line(struct vty *vty,
                }
        }
 
-       if (ret != CMD_SUCCESS && ret != CMD_WARNING) {
+       if (ret != CMD_SUCCESS &&
+           ret != CMD_WARNING &&
+           ret != CMD_SUCCESS_DAEMON) {
                struct vty_error *ve = XCALLOC(MTYPE_TMP, sizeof(*ve));
 
                memcpy(ve->error_buf, vty->buf, VTY_BUFSIZ);
index fbff1e67f4331c098f2e737d209989403e1ef3d4..de65c8bd985cfd7ac3895a4d8af8f755dae258b9 100644 (file)
@@ -355,7 +355,7 @@ struct cmd_node {
 #define IN_STR  "Filter incoming routing updates\n"
 #define V4NOTATION_STR "specify by IPv4 address notation(e.g. 0.0.0.0)\n"
 #define OSPF6_NUMBER_STR "Specify by number\n"
-#define INTERFACE_STR "Interface infomation\n"
+#define INTERFACE_STR "Interface information\n"
 #define IFNAME_STR "Interface name(e.g. ep0)\n"
 #define IP6_STR "IPv6 Information\n"
 #define OSPF6_STR "Open Shortest Path First (OSPF) for IPv6\n"
index 03ad974da6ba22cceece8d84148a134a03889901..ad83ef1e5182109657c6c04eb82d6d81019cf621 100644 (file)
@@ -89,8 +89,8 @@ static struct log_ref ferr_lib_err[] = {
        {
                .code = EC_LIB_SOCKET,
                .title = "Socket Error",
-               .description = "When attempting to access a socket a system error has occured and we were unable to properly complete the request",
-               .suggestion = "Ensure that there are sufficient system resources available and ensure that the frr user has sufficient permisions to work.  If necessary open an Issue",
+               .description = "When attempting to access a socket a system error has occurred and we were unable to properly complete the request",
+               .suggestion = "Ensure that there are sufficient system resources available and ensure that the frr user has sufficient permissions to work.  If necessary open an Issue",
        },
        {
                .code = EC_LIB_ZAPI_MISSMATCH,
index c9dd60dce0a87cb9384c160acae49dec7d01d2b1..61469856105fb0b35a2108172ca41672bde19412 100644 (file)
@@ -171,7 +171,7 @@ static inline char *label2str(mpls_label_t label, char *buf, size_t len)
                strlcpy(buf, "Router Alert", len);
                return (buf);
        case MPLS_LABEL_IPV6_EXPLICIT_NULL:
-               strlcpy(buf, "IPv6 Explict Null", len);
+               strlcpy(buf, "IPv6 Explicit Null", len);
                return (buf);
        case MPLS_LABEL_IMPLICIT_NULL:
                strlcpy(buf, "implicit-null", len);
index bee82a067eaab49ae1a3ee531a439cce51fef3d2..af4f41f37ca380ec45a2f11267ef78cff7df7bf4 100644 (file)
@@ -356,7 +356,7 @@ int sockopt_ttl(int family, int sock, int ttl)
  * Which on linux is a no-op since it is enabled by
  * default and on BSD it uses TCP_NOPUSH to do
  * the same thing( which it was not configured to
- * use).  This cleanup of the api occured on 8/1/17
+ * use).  This cleanup of the api occurred on 8/1/17
  * I imagine if after more than 1 year of no-one
  * complaining, and a major upgrade release we
  * can deprecate and remove this function call
index 27b0f0c4f035338c7186790c9bdd7f69fad7e8fd..37cbe9187cd997117b985e3c27dfd45ee761477e 100644 (file)
@@ -22,7 +22,7 @@
 #   another object file.
 #
 #   There are four known schemes of declaring weak symbols; each scheme is
-#   checked in turn, and the first one found is prefered. Note that only one
+#   checked in turn, and the first one found is preferred. Note that only one
 #   of the mentioned preprocessor macros will be defined!
 #
 #   1. Function attributes
index 1890e9bdc39aba25813a53467f337d4ceaf18df2..53d545a24bceef63081da5cdac01d800f64a19e2 100644 (file)
@@ -321,7 +321,7 @@ int ospf6_abr_originate_summary_to_area(struct ospf6_route *route,
 
        /* if this is a route to ASBR */
        if (route->type == OSPF6_DEST_TYPE_ROUTER) {
-               /* Only the prefered best path is considered */
+               /* Only the preferred best path is considered */
                if (!CHECK_FLAG(route->flag, OSPF6_ROUTE_BEST)) {
                        if (is_debug)
                                zlog_debug(
index c848a16aa94b581973865873a776629850b7a357..bc52864313ed7c3072dc4b5a07767115ed7bacec 100644 (file)
@@ -772,7 +772,7 @@ DEFUN (show_ipv6_ospf6_spf_tree,
        SHOW_STR
        IP6_STR
        OSPF6_STR
-       "Shortest Path First caculation\n"
+       "Shortest Path First calculation\n"
        "Show SPF tree\n")
 {
        struct listnode *node;
@@ -807,7 +807,7 @@ DEFUN (show_ipv6_ospf6_area_spf_tree,
        OSPF6_STR
        OSPF6_AREA_STR
        OSPF6_AREA_ID_STR
-       "Shortest Path First caculation\n"
+       "Shortest Path First calculation\n"
        "Show SPF tree\n")
 {
        int idx_ipv4 = 4;
index ad9b3efe6ee7f1d17d410751f7395004c858fe03..9fd9a70c78e9e0300eb0cddcebf50c9dac82883c 100644 (file)
@@ -277,7 +277,7 @@ static int ospf_wait_timer(struct thread *thread)
        return 0;
 }
 
-/* Hook function called after ospf ISM event is occured. And vty's
+/* Hook function called after ospf ISM event is occurred. And vty's
    network command invoke this function after making interface
    structure. */
 static void ism_timer_set(struct ospf_interface *oi)
index 91d187f412a192e6234d1a4bed04300f0a1691ba..f7c73fee3397914b2d4ed7b19eef86e2f64a3b1d 100644 (file)
@@ -94,7 +94,7 @@ static int ospf_db_desc_timer(struct thread *thread)
        return 0;
 }
 
-/* Hook function called after ospf NSM event is occured.
+/* Hook function called after ospf NSM event is occurred.
  *
  * Set/clear any timers whose condition is implicit to the neighbour
  * state. There may be other timers which are set/unset according to other
index 7f96299768ed50ada4caf4b4b556bf61523605df..147773ce235ecb1c66410286110d5308676cad7c 100644 (file)
@@ -500,7 +500,7 @@ struct opaque_info_per_type {
        /* Collection of callback functions for this opaque-type. */
        struct ospf_opaque_functab *functab;
 
-       /* List of Opaque-LSA control informations per opaque-id. */
+       /* List of Opaque-LSA control information per opaque-id. */
        struct list *id_list;
 };
 
index 79b464880555a3c2f1fb6dccab720b0013c5b4a6..3bb3b79a6a728481e75f041f88c5ad58cb786a3c 100644 (file)
@@ -3368,7 +3368,7 @@ static int ospf_make_db_desc(struct ospf_interface *oi,
                                if (IS_OPAQUE_LSA(lsa->data->type)
                                    && (!CHECK_FLAG(options, OSPF_OPTION_O))) {
                                        /* Suppress advertising
-                                        * opaque-informations. */
+                                        * opaque-information. */
                                        /* Remove LSA from DB summary list. */
                                        ospf_lsdb_delete(lsdb, lsa);
                                        continue;
index 3b0319b5912b880a64618258f874825c08e2718d..bef16761f2831346f0b8700222924330aac2ac4a 100644 (file)
@@ -591,7 +591,7 @@ static int is_mandated_params_set(struct ospf_router_info ori)
  * @param enable To activate or not Segment Routing router Information flooding
  * @param size   Size of Label Range i.e. SRGB size
  * @param lower  Lower bound of the Label Range i.e. SRGB first label
- * @param msd    Maximum label Stack Depth suported by the router
+ * @param msd    Maximum label Stack Depth supported by the router
  *
  * @return none
  */
index f43038ab8de2986bd1cb26555c7da328a6acce08..02698d770a760725128098798eaf4ed139313991 100644 (file)
@@ -2406,7 +2406,7 @@ DEFUN (no_ospf_mpls_te_inter_as,
                                ospf_mpls_te_lsa_schedule(lp, FLUSH_THIS_LSA);
        }
 
-       /* Deregister the Callbacks for Inter-AS suport */
+       /* Deregister the Callbacks for Inter-AS support */
        ospf_mpls_te_unregister();
 
        return CMD_SUCCESS;
index dc54f04c07473a69521a6c34e19313813afde006..aa40dd0ebcb4878faee16aadfd4c3f140cfec06a 100644 (file)
@@ -171,7 +171,7 @@ void ospf_router_id_update(struct ospf *ospf)
 
                /* Flush (inline) all external LSAs which now match the new
                   router-id,
-                  need to adjust the OSPF_LSA_SELF flag, so the flush doesnt
+                  need to adjust the OSPF_LSA_SELF flag, so the flush doesn't
                   hit
                   asserts in ospf_refresher_unregister_lsa(). This step is
                   needed
index 25d64238bfd3b6ced06a290e6795e8bad96d93db..b7391a171a653215e09d8b23bb99485bd82a3ae4 100644 (file)
@@ -207,13 +207,13 @@ static int rule_notify_owner(int command, struct zclient *zclient,
 
        switch (note) {
        case ZAPI_RULE_FAIL_INSTALL:
-               DEBUGD(&pbr_dbg_zebra, "%s: Recieved RULE_FAIL_INSTALL",
+               DEBUGD(&pbr_dbg_zebra, "%s: Received RULE_FAIL_INSTALL",
                       __PRETTY_FUNCTION__);
                pbrms->installed &= ~installed;
                break;
        case ZAPI_RULE_INSTALLED:
                pbrms->installed |= installed;
-               DEBUGD(&pbr_dbg_zebra, "%s: Recived RULE_INSTALLED",
+               DEBUGD(&pbr_dbg_zebra, "%s: Received RULE_INSTALLED",
                       __PRETTY_FUNCTION__);
                break;
        case ZAPI_RULE_FAIL_REMOVE:
index 2550651464321d2cf75fbb73d276d5f841e0ab02..b0d7a7b2db07a50b0a1afcc36237de25f17c2511 100644 (file)
@@ -188,7 +188,7 @@ static int pim_vrf_config_write(struct vty *vty)
                pim_global_config_write_worker(pim, vty);
 
                if (vrf->vrf_id != VRF_DEFAULT)
-                       vty_endframe(vty, "!\n");
+                       vty_endframe(vty, " exit-vrf\n!\n");
        }
 
        return 0;
index 807ad2bd129279a9646311c86719cdc6c4d6745b..7e072e6ade4037b594b4e9daf47e9f62a1f0406f 100644 (file)
@@ -74,7 +74,7 @@ static int pim_msdp_sa_adv_timer_cb(struct thread *t)
        struct pim_instance *pim = THREAD_ARG(t);
 
        if (PIM_DEBUG_MSDP_EVENTS) {
-               zlog_debug("MSDP SA advertisment timer expired");
+               zlog_debug("MSDP SA advertisement timer expired");
        }
 
        pim_msdp_sa_adv_timer_setup(pim, true /* start */);
index e5f5b34f2f857da8fc484d7c0f8599b07b3416d8..cd5b632dedb95d006a1f86d63afee0331831d614 100644 (file)
@@ -462,7 +462,7 @@ static int pim_upstream_could_register(struct pim_upstream *up)
        return 0;
 }
 
-/* Source registration is supressed for SSM groups. When the SSM range changes
+/* Source registration is suppressed for SSM groups. When the SSM range changes
  * we re-revaluate register setup for existing upstream entries */
 void pim_upstream_register_reevaluate(struct pim_instance *pim)
 {
index 444a09914c16a7a51a5e3fd00a7d544055be4da1..dd0d17ee47c0cf8dd94769ef592c7990dcf24526 100644 (file)
@@ -1238,7 +1238,7 @@ static void rip_response_process(struct rip_packet *packet, int size,
                   Ciscos before the 'ip subnet zero' option, it would be almost
                   right too :-)
 
-                  Cisco summarize ripv1 advertisments to the classful boundary
+                  Cisco summarize ripv1 advertisements to the classful boundary
                   (/16 for class B's) except when the RIP packet does to inside
                   the classful network in question.  */
 
@@ -2513,7 +2513,7 @@ static void rip_update_process(int route_type)
                                                      VRF_DEFAULT);
                        if (!connected) {
                                zlog_warn(
-                                       "Neighbor %s doesnt have connected interface!",
+                                       "Neighbor %s doesn't have connected interface!",
                                        inet_ntoa(p->u.prefix4));
                                continue;
                        }
index 08dc3d8b4d330dd1502960e29f7040679d4156a3..2cbbbae7f547faf5f29d2413802f519e6fdbc522 100644 (file)
@@ -1560,7 +1560,7 @@ void ripng_output_process(struct interface *ifp, struct sockaddr_in6 *to,
                    && rinfo->suppress == 0) {
                        /* If no route-map are applied, the RTE will be these
                         * following
-                        * informations.
+                        * information.
                         */
                        p = (struct prefix_ipv6 *)&rp->p;
                        rinfo->metric_out = rinfo->metric;
@@ -1701,7 +1701,7 @@ void ripng_output_process(struct interface *ifp, struct sockaddr_in6 *to,
                    && aggregate->suppress == 0) {
                        /* If no route-map are applied, the RTE will be these
                         * following
-                        * informations.
+                        * information.
                         */
                        p = (struct prefix_ipv6 *)&rp->p;
                        aggregate->metric_set = 0;
index ad143209ee0bb70c72147db96ca756fdb738cd3e..9dd25fbdd1316f19685e9f6a35a7cf66006514fc 100644 (file)
@@ -164,7 +164,7 @@ static int static_vrf_config_write(struct vty *vty)
                              SAFI_UNICAST, "ipv6 route");
 
                if (vrf->vrf_id != VRF_DEFAULT)
-                       vty_endframe(vty, "!\n");
+                       vty_endframe(vty, " exit-vrf\n!\n");
        }
 
        return 0;
index 28fac0c8705d5cb3265628974aa4f4ac9820ec77..bc8a429d565312b7faf5cc3142642b6d9cc6678a 100644 (file)
@@ -199,7 +199,7 @@ static int zebra_static_route_holdem(
        const char *dest_str, const char *mask_str, const char *src_str,
        const char *gate_str, const char *ifname, const char *flag_str,
        const char *tag_str, const char *distance_str, const char *label_str,
-       const char *table_str)
+       const char *table_str, bool onlink)
 {
        struct static_hold_route *shr, *lookup;
        struct listnode *node;
@@ -212,6 +212,7 @@ static int zebra_static_route_holdem(
        shr->nhvrf_name = XSTRDUP(MTYPE_STATIC_ROUTE, nh_svrf->vrf->name);
        shr->afi = afi;
        shr->safi = safi;
+       shr->onlink = onlink;
        if (dest)
                prefix_copy(&shr->dest, dest);
        if (dest_str)
@@ -347,7 +348,7 @@ static int static_route_leak(
                return zebra_static_route_holdem(
                        svrf, nh_svrf, afi, safi, negate, &p, dest_str,
                        mask_str, src_str, gate_str, ifname, flag_str, tag_str,
-                       distance_str, label_str, table_str);
+                       distance_str, label_str, table_str, onlink);
        }
 
        if (table_str) {
@@ -646,7 +647,9 @@ int static_config(struct vty *vty, struct static_vrf *svrf, afi_t afi,
                if (shr->table_str)
                        vty_out(vty, "table %s", shr->table_str);
                if (strcmp(shr->vrf_name, shr->nhvrf_name) != 0)
-                       vty_out(vty, "nexthop-vrf %s", shr->nhvrf_name);
+                       vty_out(vty, "nexthop-vrf %s ", shr->nhvrf_name);
+               if (shr->onlink)
+                       vty_out(vty, "onlink");
                vty_out(vty, "\n");
        }
 
@@ -717,6 +720,9 @@ int static_config(struct vty *vty, struct static_vrf *svrf, afi_t afi,
                            svrf->vrf->data.l.table_id == RT_TABLE_MAIN)
                                vty_out(vty, " table %u", si->table_id);
 
+                       if (si->onlink)
+                               vty_out(vty, " onlink");
+
                        vty_out(vty, "\n");
 
                        write = 1;
index 474b299d90003c5baef343c86166270e8a5532d9..1514082e9033886915a44cb06b797d44b3ae329a 100644 (file)
@@ -36,3 +36,4 @@ babeld=no
 sharpd=no
 pbrd=no
 bfdd=no
+fabricd=no
index 640437f441ce1fe0bef1021bb5ae6b4356c0669d..bd0e370d1eab152f49384c745aac64687f5afe38 100644 (file)
@@ -20,6 +20,7 @@ sharpd_options="  --daemon -A 127.0.0.1"
 pbrd_options="  --daemon -A 127.0.0.1"
 staticd_options="  --daemon -A 127.0.0.1"
 bfdd_options="  --daemon -A 127.0.0.1"
+fabricd_options="  --daemon -A 127.0.0.1"
 
 # The list of daemons to watch is automatically generated by the init script.
 watchfrr_enable=yes
index ff7cd48318ea6b95d0b3647b823f16f21ae30d0c..4612e8beaf7a200bd3f16d1dabab1c3e5a69762b 100644 (file)
@@ -8,6 +8,7 @@ if  $programname == 'babeld' or
     $programname == 'eigrpd' or
     $programname == 'frr' or
     $programname == 'isisd' or
+    $programname == 'fabricd' or
     $programname == 'ldpd' or
     $programname == 'nhrpd' or
     $programname == 'ospf6d' or
@@ -24,6 +25,7 @@ if  $programname == 'babeld' or
     $programname == 'eigrpd' or
     $programname == 'frr' or
     $programname == 'isisd' or
+    $programname == 'fabricd' or
     $programname == 'ldpd' or
     $programname == 'nhrpd' or
     $programname == 'ospf6d' or
index c57ef6baf9afb90ea1c13bf216d945e0868c9ec3..ee8dc883dc3f97fe5c761e20c0c2f4eaa4689bba 100755 (executable)
@@ -25,7 +25,7 @@ FRR_VTY_GROUP="@enable_vty_group@" # frrvty
 # Local Daemon selection may be done by using /etc/frr/daemons.
 # See /usr/share/doc/frr/README.Debian.gz for further information.
 # Keep zebra first and do not list watchfrr!
-DAEMONS="zebra bgpd ripd ripngd ospfd ospf6d isisd babeld pimd ldpd nhrpd eigrpd sharpd pbrd staticd bfdd"
+DAEMONS="zebra bgpd ripd ripngd ospfd ospf6d isisd babeld pimd ldpd nhrpd eigrpd sharpd pbrd staticd bfdd fabricd"
 MAX_INSTANCES=5
 RELOAD_SCRIPT="$D_PATH/frr-reload.py"
 
index 8daeda7402a1b98cd7285b13cf554ee921540486..f2a1e9434bc9d2d848ec4a6591844986444c59f8 100644 (file)
@@ -1013,7 +1013,7 @@ int main(int argc, char **argv)
        if (background) { /* ok, we need to detach this process */
                int i, fd;
                if (quietmode < 0)
-                       printf("Detatching to start %s...", startas);
+                       printf("Detaching to start %s...", startas);
                i = fork();
                if (i < 0) {
                        fatal("Unable to fork.\n");
index 7a7744f7c05262fbfa0cabc0669e09fa9a6f27b2..541eafcf7fae11d88c1ad960358e87ab00b484a5 100644 (file)
@@ -132,16 +132,83 @@ static void config_add_line_uniq(struct list *config, const char *line)
 }
 
 /*
- * I want to explicitly move this command to the end of the line
+ * Add a line that should only be shown once, and always show at the end of the
+ * config block.
+ *
+ * If the line already exists, it will be moved to the end of the block. If it
+ * does not exist, it will be added at the end of the block.
+ *
+ * Note that this only makes sense when there is just one such line that should
+ * show up at the very end of a config block. Furthermore, if the same block
+ * can show up from multiple daemons, all of them must make sure to print the
+ * line at the end of their config, otherwise the line will show at the end of
+ * the config for the last daemon that printed it.
+ *
+ * Here is a motivating example with the 'exit-vrf' command. Suppose we receive
+ * a config from Zebra like so:
+ *
+ * vrf BLUE
+ *    ip route A
+ *    ip route B
+ *    exit-vrf
+ *
+ * Then suppose we later receive this config from PIM:
+ *
+ * vrf BLUE
+ *    ip msdp mesh-group MyGroup member 1.2.3.4
+ *    exit-vrf
+ *
+ * Then we will combine them into one config block like so:
+ *
+ * vrf BLUE
+ *    ip route A
+ *    ip route B
+ *    ip msdp mesh-group MyGroup member 1.2.3.4
+ *    exit-vrf
+ *
+ * Because PIM also sent us an 'exit-vrf', we noticed that we already had one
+ * under the 'vrf BLUE' config block and so we moved it to the end of the
+ * config block again. If PIM had neglected to send us 'exit-vrf', the result
+ * would be this:
+ *
+ * vrf BLUE
+ *    ip route A
+ *    ip route B
+ *    exit-vrf
+ *    ip msdp mesh-group MyGroup member 1.2.3.4
+ *
+ * Therefore, daemons that share config blocks must take care to consistently
+ * print the same block terminators.
+ *
+ * Ideally this would be solved by adding a string to struct config that is
+ * always printed at the end when dumping a config. However, this would only
+ * work when the user is using integrated config. In the non-integrated config
+ * case, daemons are responsible for writing their own config files, and so the
+ * must be able to print these blocks correctly independently of vtysh, which
+ * means they are the ones that need to handle printing the block terminators
+ * and VTYSH needs to be smart enough to combine them properly.
+ *
+ * ---
+ *
+ * config
+ *    The config to add the line to
+ *
+ * line
+ *    The line to add to the end of the config
  */
-static void config_add_line_end(struct list *config, const char *line)
+static void config_add_line_uniq_end(struct list *config, const char *line)
 {
        struct listnode *node;
-       void *item = XSTRDUP(MTYPE_VTYSH_CONFIG_LINE, line);
+       char *pnt;
 
-       listnode_add(config, item);
-       node = listnode_lookup(config, item);
-       if (node)
+       for (ALL_LIST_ELEMENTS_RO(config, node, pnt)) {
+               if (strcmp(pnt, line) == 0)
+                       break;
+       }
+
+       if (!node)
+               config_add_line(config, line);
+       else
                listnode_move_to_tail(config, node);
 }
 
@@ -158,8 +225,6 @@ void vtysh_config_parse_line(void *arg, const char *line)
        if (c == '\0')
                return;
 
-       /* printf ("[%s]\n", line); */
-
        switch (c) {
        /* Suppress exclamation points ! and commented lines. The !s are
         * generated
@@ -178,10 +243,10 @@ void vtysh_config_parse_line(void *arg, const char *line)
                        } else if (strncmp(line, " ip multicast boundary",
                                           strlen(" ip multicast boundary"))
                                   == 0) {
-                               config_add_line_end(config->line, line);
+                               config_add_line_uniq_end(config->line, line);
                        } else if (strncmp(line, " ip igmp query-interval",
                                           strlen(" ip igmp query-interval")) == 0) {
-                               config_add_line_end(config->line, line);
+                               config_add_line_uniq_end(config->line, line);
                        } else if (config->index == LINK_PARAMS_NODE
                                   && strncmp(line, "  exit-link-params",
                                              strlen("  exit"))
@@ -192,8 +257,7 @@ void vtysh_config_parse_line(void *arg, const char *line)
                                   && strncmp(line, " exit-vrf",
                                              strlen(" exit-vrf"))
                                              == 0) {
-                               config_add_line(config->line, line);
-                               config->index = CONFIG_NODE;
+                               config_add_line_uniq_end(config->line, line);
                        } else if (config->index == RMAP_NODE
                                   || config->index == INTERFACE_NODE
                                   || config->index == LOGICALROUTER_NODE
index 3f918c361aafd506645186d79562fc69239955cf..44afd266bc1e1bfc0b0d8354163cf79c8aaa4ac4 100644 (file)
@@ -61,7 +61,7 @@ void ifstat_update_sysctl(void)
        /* We free this memory at the end of this function. */
        ref = buf = XMALLOC(MTYPE_TMP, bufsiz);
 
-       /* Fetch interface informations into allocated buffer. */
+       /* Fetch interface information into allocated buffer. */
        if (sysctl(mib, MIBSIZ, buf, &bufsiz, NULL, 0) < 0) {
                flog_warn(EC_ZEBRA_SYSCTL_FAILED, "sysctl error by %s",
                          safe_strerror(errno));
@@ -113,7 +113,7 @@ void interface_list(struct zebra_ns *zns)
        /* We free this memory at the end of this function. */
        ref = buf = XMALLOC(MTYPE_TMP, bufsiz);
 
-       /* Fetch interface informations into allocated buffer. */
+       /* Fetch interface information into allocated buffer. */
        if (sysctl(mib, MIBSIZ, buf, &bufsiz, NULL, 0) < 0) {
                flog_err_sys(EC_ZEBRA_IFLIST_FAILED,
                             "Could not enumerate interfaces: %s",
index 2b5bf04adee6613d6bc8458c23c14de1041e1f21..bebccd716820403b20c856e07e8f7da6ba0d75bc 100644 (file)
@@ -97,7 +97,7 @@ static void parse_irdp_packet(char *p, int len, struct interface *ifp)
 
        if (len != iplen) {
                flog_err(EC_ZEBRA_IRDP_LEN_MISMATCH,
-                        "IRDP: RX length doesnt match IP length");
+                        "IRDP: RX length doesn't match IP length");
                return;
        }
 
@@ -108,7 +108,7 @@ static void parse_irdp_packet(char *p, int len, struct interface *ifp)
                return;
        }
 
-       /* XXX: RAW doesnt receive link-layer, surely? ??? */
+       /* XXX: RAW doesn't receive link-layer, surely? ??? */
        /* Check so we don't checksum packets longer than oure RX_BUF - (ethlen
         +
         len of IP-header) 14+20 */
index 8df5a37640674abcff43818c88de686bbd756cbe..9c3d9adefbc96cde7887e6a73eeda9255d6ee25f 100644 (file)
@@ -469,7 +469,7 @@ int ifm_read(struct if_msghdr *ifm)
                if (ifnlen && (strncmp(ifp->name, ifname, IFNAMSIZ) != 0)) {
                        if (IS_ZEBRA_DEBUG_KERNEL)
                                zlog_debug(
-                                       "%s: ifp name %s doesnt match sdl name %s",
+                                       "%s: ifp name %s doesn't match sdl name %s",
                                        __func__, ifp->name, ifname);
                        ifp = NULL;
                }
index e8d0b71605405824312673471243acbef13308eb..c49dc7bab23fb7363e9a85d364132b0a187bc2cb 100644 (file)
@@ -245,9 +245,12 @@ static int kernel_rtm_ipv4(int cmd, const struct prefix *p,
        } /* for (ALL_NEXTHOPS(...))*/
 
        /* If there was no useful nexthop, then complain. */
-       if (nexthop_num == 0 && IS_ZEBRA_DEBUG_KERNEL)
-               zlog_debug("%s: No useful nexthops were found in RIB entry %p",
-                          __func__, re);
+       if (nexthop_num == 0) {
+               if (IS_ZEBRA_DEBUG_KERNEL)
+                       zlog_debug("%s: No useful nexthops were found in RIB entry %p",
+                                  __func__, re);
+               return 1;
+       }
 
        return 0; /*XXX*/
 }
@@ -374,7 +377,7 @@ static int kernel_rtm_ipv6(int cmd, const struct prefix *p,
        if (nexthop_num == 0) {
                if (IS_ZEBRA_DEBUG_KERNEL)
                        zlog_debug("kernel_rtm_ipv6(): No useful nexthop.");
-               return 0;
+               return 1;
        }
 
        return 0; /*XXX*/
index 40d673a8914586aa6aac46dc1f600080c19f5e3b..dd0e270149c7ecd2f625c5eee67b9cf310e894d8 100644 (file)
@@ -296,7 +296,7 @@ static void vty_show_ip_route_detail(struct vty *vty, struct route_node *rn,
                                if (vrf)
                                        vty_out(vty, "(vrf %s)", vrf->name);
                                else
-                                       vty_out(vty, "(vrf UKNOWN)");
+                                       vty_out(vty, "(vrf UNKNOWN)");
                        }
 
                        if (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_DUPLICATE))
@@ -671,7 +671,7 @@ static void vty_show_ip_route(struct vty *vty, struct route_node *rn,
                        if (vrf)
                                vty_out(vty, "(vrf %s)", vrf->name);
                        else
-                               vty_out(vty, "(vrf UKNOWN)");
+                               vty_out(vty, "(vrf UNKNOWN)");
                }
 
                if (!CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_ACTIVE))
index bc463b716a4aa6f9cb15b89e8819fbabfd3f93cf..58cf6eb30f1338c9a05ef01244d1abaae1791ad3 100644 (file)
@@ -1856,7 +1856,7 @@ static int zvni_gw_macip_del(struct interface *ifp, zebra_vni_t *zvni,
        /* mac entry should be present */
        mac = zvni_mac_lookup(zvni, &n->emac);
        if (!mac) {
-               zlog_debug("MAC %s doesnt exists for neigh %s on VNI %u",
+               zlog_debug("MAC %s doesn't exist for neigh %s on VNI %u",
                           prefix_mac2str(&n->emac, buf1, sizeof(buf1)),
                           ipaddr2str(ip, buf2, sizeof(buf2)), zvni->vni);
                return -1;
@@ -4554,7 +4554,7 @@ void zebra_vxlan_print_specific_rmac_l3vni(struct vty *vty, vni_t l3vni,
                if (use_json)
                        vty_out(vty, "{}\n");
                else
-                       vty_out(vty, "%% L3-VNI %u doesnt exist\n", l3vni);
+                       vty_out(vty, "%% L3-VNI %u doesn't exist\n", l3vni);
                return;
        }
 
@@ -4564,7 +4564,7 @@ void zebra_vxlan_print_specific_rmac_l3vni(struct vty *vty, vni_t l3vni,
                        vty_out(vty, "{}\n");
                else
                        vty_out(vty,
-                               "%% Requested RMAC doesnt exist in L3-VNI %u",
+                               "%% Requested RMAC doesn't exist in L3-VNI %u",
                                l3vni);
                return;
        }