summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pimd/pim_nht.c2
-rw-r--r--pimd/pim_zlookup.c20
-rw-r--r--zebra/zebra_vty.c14
-rw-r--r--zebra/zebra_vxlan.c2
4 files changed, 25 insertions, 13 deletions
diff --git a/pimd/pim_nht.c b/pimd/pim_nht.c
index 3cbd11a9ae..fa6486a83e 100644
--- a/pimd/pim_nht.c
+++ b/pimd/pim_nht.c
@@ -667,7 +667,7 @@ int pim_parse_nexthop_update(int command, struct zclient *zclient,
* RPF address from nexthop cache (i.e.
* destination) as PIM nexthop.
*/
- nexthop->type = NEXTHOP_TYPE_IPV4;
+ nexthop->type = NEXTHOP_TYPE_IPV4_IFINDEX;
nexthop->gate.ipv4 =
pnc->rpf.rpf_addr.u.prefix4;
break;
diff --git a/pimd/pim_zlookup.c b/pimd/pim_zlookup.c
index 9295b231cb..fb616e1b0d 100644
--- a/pimd/pim_zlookup.c
+++ b/pimd/pim_zlookup.c
@@ -215,6 +215,8 @@ static int zclient_read_nexthop(struct pim_instance *pim,
tab_size, addr_str, pim->vrf->name);
return num_ifindex;
}
+ nexthop_tab[num_ifindex].protocol_distance = distance;
+ nexthop_tab[num_ifindex].route_metric = metric;
switch (nexthop_type) {
case NEXTHOP_TYPE_IFINDEX:
nexthop_tab[num_ifindex].ifindex = stream_getl(s);
@@ -276,13 +278,19 @@ static int zclient_read_nexthop(struct pim_instance *pim,
}
++num_ifindex;
break;
- case NEXTHOP_TYPE_IPV6:
- case NEXTHOP_TYPE_BLACKHOLE:
- /* ignore */
- continue;
+ default:
+ /* do nothing */
+ {
+ char addr_str[INET_ADDRSTRLEN];
+ pim_inet4_dump("<addr?>", addr, addr_str,
+ sizeof(addr_str));
+ zlog_warn(
+ "%s: found non-ifindex nexthop type=%d for address %s(%s)",
+ __PRETTY_FUNCTION__, nexthop_type,
+ addr_str, pim->vrf->name);
+ }
+ break;
}
- nexthop_tab[num_ifindex].protocol_distance = distance;
- nexthop_tab[num_ifindex].route_metric = metric;
}
return num_ifindex;
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
index eb11941a3a..9ce8c74220 100644
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -260,18 +260,22 @@ static int zebra_static_route_holdem(
return CMD_SUCCESS;
}
- XFREE(MTYPE_STATIC_ROUTE, shr->nhvrf_name);
- XFREE(MTYPE_STATIC_ROUTE, shr->vrf_name);
- XFREE(MTYPE_STATIC_ROUTE, shr);
/*
* If a person enters the same line again
* we need to silently accept it
*/
- return CMD_SUCCESS;
+ goto shr_cleanup;
}
- if (!negate)
+ if (!negate) {
listnode_add_sort(static_list, shr);
+ return CMD_SUCCESS;
+ }
+
+shr_cleanup:
+ XFREE(MTYPE_STATIC_ROUTE, shr->nhvrf_name);
+ XFREE(MTYPE_STATIC_ROUTE, shr->vrf_name);
+ XFREE(MTYPE_STATIC_ROUTE, shr);
return CMD_SUCCESS;
}
diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c
index 98fa7ccf67..59f0cf52f0 100644
--- a/zebra/zebra_vxlan.c
+++ b/zebra/zebra_vxlan.c
@@ -1864,7 +1864,7 @@ static int zvni_gw_macip_del(struct interface *ifp, zebra_vni_t *zvni,
zlog_debug(
"%u:SVI %s(%u) VNI %u, sending GW MAC %s IP %s del to BGP",
ifp->vrf_id, ifp->name, ifp->ifindex, zvni->vni,
- prefix_mac2str(&(n->emac), NULL, ETHER_ADDR_STRLEN),
+ prefix_mac2str(&(n->emac), buf1, sizeof(buf1)),
ipaddr2str(ip, buf2, sizeof(buf2)));
/* Remove neighbor from BGP. */