diff options
Diffstat (limited to '')
-rw-r--r-- | zebra/zebra_cli.c | 2 | ||||
-rw-r--r-- | zebra/zebra_mpls.c | 12 | ||||
-rw-r--r-- | zebra/zebra_mpls_vty.c | 5 | ||||
-rw-r--r-- | zebra/zebra_nb_config.c | 1 | ||||
-rw-r--r-- | zebra/zebra_nhg.c | 3 | ||||
-rw-r--r-- | zebra/zebra_routemap.c | 5 | ||||
-rw-r--r-- | zebra/zebra_vxlan.c | 23 |
7 files changed, 38 insertions, 13 deletions
diff --git a/zebra/zebra_cli.c b/zebra/zebra_cli.c index 00e0a49..3e03d74 100644 --- a/zebra/zebra_cli.c +++ b/zebra/zebra_cli.c @@ -241,7 +241,7 @@ DEFUN_YANG_NOSH (link_params, return ret; } -DEFUN_NOSH (exit_link_params, +DEFUN_YANG_NOSH (exit_link_params, exit_link_params_cmd, "exit-link-params", "Exit from Link Params configuration mode\n") diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c index 15e36ac..39fc678 100644 --- a/zebra/zebra_mpls.c +++ b/zebra/zebra_mpls.c @@ -2634,8 +2634,16 @@ int zebra_mpls_write_fec_config(struct vty *vty, struct zebra_vrf *zvrf) continue; write = 1; - vty_out(vty, "mpls label bind %pFX %s\n", &rn->p, - label2str(fec->label, 0, lstr, BUFSIZ)); + + if (fec->label == MPLS_LABEL_IPV4_EXPLICIT_NULL || + fec->label == MPLS_LABEL_IPV6_EXPLICIT_NULL) + strlcpy(lstr, "explicit-null", sizeof(lstr)); + else if (fec->label == MPLS_LABEL_IMPLICIT_NULL) + strlcpy(lstr, "implicit-null", sizeof(lstr)); + else + snprintf(lstr, sizeof(lstr), "%d", fec->label); + + vty_out(vty, "mpls label bind %pFX %s\n", &rn->p, lstr); } } diff --git a/zebra/zebra_mpls_vty.c b/zebra/zebra_mpls_vty.c index fd09e6b..83a1aad 100644 --- a/zebra/zebra_mpls_vty.c +++ b/zebra/zebra_mpls_vty.c @@ -247,7 +247,7 @@ DEFUN (mpls_label_bind, DEFUN (no_mpls_label_bind, no_mpls_label_bind_cmd, - "no mpls label bind <A.B.C.D/M|X:X::X:X/M> [<(16-1048575)|implicit-null>]", + "no mpls label bind <A.B.C.D/M|X:X::X:X/M> [<(16-1048575)|implicit-null|explicit-null>]", NO_STR MPLS_STR "Label configuration\n" @@ -255,7 +255,8 @@ DEFUN (no_mpls_label_bind, "IPv4 prefix\n" "IPv6 prefix\n" "MPLS Label to bind\n" - "Use Implicit-Null Label\n") + "Use Implicit-Null Label\n" + "Use Explicit-Null Label\n") { return zebra_mpls_bind(vty, 0, argv[4]->arg, NULL); } diff --git a/zebra/zebra_nb_config.c b/zebra/zebra_nb_config.c index 5cb9985..ff2529f 100644 --- a/zebra/zebra_nb_config.c +++ b/zebra/zebra_nb_config.c @@ -3187,6 +3187,7 @@ int lib_interface_zebra_ipv6_router_advertisements_dnssl_dnssl_domain_create( strlcpy(dnssl.name, yang_dnode_get_string(args->dnode, "domain"), sizeof(dnssl.name)); ret = rtadv_dnssl_encode(dnssl.encoded_name, dnssl.name); + dnssl.encoded_len = ret; if (args->event == NB_EV_VALIDATE) { if (ret < 0) { diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c index dc403b8..ed949da 100644 --- a/zebra/zebra_nhg.c +++ b/zebra/zebra_nhg.c @@ -3657,8 +3657,9 @@ void zebra_interface_nhg_reinstall(struct interface *ifp) "%s: Setting the valid flag for nhe %pNG, interface: %s", __func__, rb_node_dep->nhe, ifp->name); } + /* Check for singleton NHG associated to interface */ - if (nexthop_is_ifindex_type(nh) && + if (!nexthop_is_blackhole(nh) && zebra_nhg_depends_is_empty(rb_node_dep->nhe)) { struct nhg_connected *rb_node_dependent; diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c index 95da789..c1ec506 100644 --- a/zebra/zebra_routemap.c +++ b/zebra/zebra_routemap.c @@ -299,8 +299,7 @@ int ip_protocol_rm_add(struct zebra_vrf *zvrf, const char *rmap, int rtype, route_map_lookup_by_name(PROTO_RM_NAME(zvrf, afi, rtype)); route_map_counter_increment(PROTO_RM_MAP(zvrf, afi, rtype)); - if (PROTO_RM_MAP(zvrf, afi, rtype)) { - + if (PROTO_RM_NAME(zvrf, afi, rtype)) { if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug( "%u: IPv4 Routemap config for protocol %d scheduling RIB processing", @@ -326,7 +325,7 @@ int ip_protocol_rm_del(struct zebra_vrf *zvrf, const char *rmap, int rtype, if (!rmap || strcmp(rmap, PROTO_RM_NAME(zvrf, afi, rtype)) == 0) { route_map_counter_decrement(PROTO_RM_MAP(zvrf, afi, rtype)); - if (PROTO_RM_MAP(zvrf, afi, rtype)) { + if (PROTO_RM_NAME(zvrf, afi, rtype)) { if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug( "%u: IPv4 Routemap unconfig for protocol %d, scheduling RIB processing", diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c index 2ffaefd..0b75ec2 100644 --- a/zebra/zebra_vxlan.c +++ b/zebra/zebra_vxlan.c @@ -1763,9 +1763,9 @@ static int svd_remote_nh_add(struct zebra_l3vni *zl3vni, } else if (memcmp(&nh->emac, rmac, ETH_ALEN) != 0) { if (IS_ZEBRA_DEBUG_VXLAN) - zlog_debug( - "SVD RMAC change(%pEA --> %pEA) for nexthop %pIA, prefix %pFX", - &nh->emac, rmac, vtep_ip, host_prefix); + zlog_debug("SVD RMAC change(%pEA --> %pEA) for nexthop %pIA, prefix %pFX refcnt %u", + &nh->emac, rmac, vtep_ip, host_prefix, + nh->refcnt); memcpy(&nh->emac, rmac, ETH_ALEN); /* install (update) the nh neigh in kernel */ @@ -2473,11 +2473,26 @@ static void zl3vni_del_rmac_hash_entry(struct hash_bucket *bucket, void *ctx) /* delete and uninstall nh hash entry */ static void zl3vni_del_nh_hash_entry(struct hash_bucket *bucket, void *ctx) { - struct zebra_neigh *n = NULL; + struct zebra_neigh *n = NULL, *svd_nh = NULL; struct zebra_l3vni *zl3vni = NULL; n = (struct zebra_neigh *)bucket->data; zl3vni = (struct zebra_l3vni *)ctx; + + /* remove SVD based remote nexthop neigh entry */ + svd_nh = svd_nh_lookup(&n->ip); + if (svd_nh) { + svd_nh->refcnt--; + if (IS_ZEBRA_DEBUG_VXLAN) + zlog_debug("%s L3VNI %u remove svd nh %pIA refcnt %u", + __func__, zl3vni->vni, &n->ip, + svd_nh->refcnt); + if (svd_nh->refcnt == 0) { + svd_nh_uninstall(zl3vni, svd_nh); + svd_nh_del(svd_nh); + } + } + zl3vni_nh_uninstall(zl3vni, n); zl3vni_nh_del(zl3vni, n); } |