summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_route.c6
-rw-r--r--doc/developer/logging.rst2
-rw-r--r--doc/developer/zebra.rst2
-rw-r--r--pimd/pim_nht.c21
-rw-r--r--tests/topotests/isis_advertise_high_metrics/test_isis_advertise_high_metrics.py36
5 files changed, 24 insertions, 43 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 91fb0c7801..65f7ce1643 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -11904,12 +11904,14 @@ void route_vty_out_detail_header(struct vty *vty, struct bgp *bgp,
vty_out(vty,
"BGP routing table entry for %s%s%pFX, version %" PRIu64
"\n",
- ((safi == SAFI_MPLS_VPN || safi == SAFI_ENCAP)
+ (((safi == SAFI_MPLS_VPN ||
+ safi == SAFI_ENCAP) &&
+ prd)
? prefix_rd2str(prd, buf1,
sizeof(buf1),
bgp->asnotation)
: ""),
- safi == SAFI_MPLS_VPN ? ":" : "", p,
+ safi == SAFI_MPLS_VPN && prd ? ":" : "", p,
dest->version);
} else {
diff --git a/doc/developer/logging.rst b/doc/developer/logging.rst
index 2fe0a5989b..52653d3768 100644
--- a/doc/developer/logging.rst
+++ b/doc/developer/logging.rst
@@ -518,7 +518,7 @@ General utility formats
that could be used in conjunction to snprintfrr. Use like::
char buf[ISO_ADDR_STRLEN];
- struct iso_net addr = {.len = 4, .addr = {1, 2, 3, 4}};
+ struct iso_address addr = {.addr_len = 4, .area_addr = {1, 2, 3, 4}};
snprintfrr(buf, ISO_ADDR_STRLEN, "%pIS", &addr);
.. frrfmt:: %pSY (uint8_t *)
diff --git a/doc/developer/zebra.rst b/doc/developer/zebra.rst
index cef53f1cbe..5f039758a5 100644
--- a/doc/developer/zebra.rst
+++ b/doc/developer/zebra.rst
@@ -218,8 +218,6 @@ Zebra Protocol Commands
+------------------------------------+-------+
| ZEBRA_IMPORT_ROUTE_UNREGISTER | 27 |
+------------------------------------+-------+
-| ZEBRA_IMPORT_CHECK_UPDATE | 28 |
-+------------------------------------+-------+
| ZEBRA_BFD_DEST_REGISTER | 29 |
+------------------------------------+-------+
| ZEBRA_BFD_DEST_DEREGISTER | 30 |
diff --git a/pimd/pim_nht.c b/pimd/pim_nht.c
index d164e7ed81..cb0d8c5c92 100644
--- a/pimd/pim_nht.c
+++ b/pimd/pim_nht.c
@@ -724,20 +724,13 @@ int pim_parse_nexthop_update(ZAPI_CALLBACK_ARGS)
return 0;
}
- if (cmd == ZEBRA_NEXTHOP_UPDATE) {
- rpf.rpf_addr = pim_addr_from_prefix(&match);
- pnc = pim_nexthop_cache_find(pim, &rpf);
- if (!pnc) {
- if (PIM_DEBUG_PIM_NHT)
- zlog_debug(
- "%s: Skipping NHT update, addr %pPA is not in local cached DB.",
- __func__, &rpf.rpf_addr);
- return 0;
- }
- } else {
- /*
- * We do not currently handle ZEBRA_IMPORT_CHECK_UPDATE
- */
+ rpf.rpf_addr = pim_addr_from_prefix(&match);
+ pnc = pim_nexthop_cache_find(pim, &rpf);
+ if (!pnc) {
+ if (PIM_DEBUG_PIM_NHT)
+ zlog_debug(
+ "%s: Skipping NHT update, addr %pPA is not in local cached DB.",
+ __func__, &rpf.rpf_addr);
return 0;
}
diff --git a/tests/topotests/isis_advertise_high_metrics/test_isis_advertise_high_metrics.py b/tests/topotests/isis_advertise_high_metrics/test_isis_advertise_high_metrics.py
index daad20f04a..ada8c0f5fb 100644
--- a/tests/topotests/isis_advertise_high_metrics/test_isis_advertise_high_metrics.py
+++ b/tests/topotests/isis_advertise_high_metrics/test_isis_advertise_high_metrics.py
@@ -121,14 +121,14 @@ def _check_interface_metrics(router, expected_metrics):
tgen = get_topogen()
router = tgen.gears[router]
logger.info(f"check_interface_metrics {router}")
- isis_interface_output = router.vtysh_cmd(
- "show isis interface detail json"
- )
+ isis_interface_output = router.vtysh_cmd("show isis interface detail json")
intf_json = json.loads(isis_interface_output)
for i in range(len(expected_metrics)):
- metric = intf_json["areas"][0]["circuits"][i]["interface"]["levels"][0]["metric"]
- if (metric != expected_metrics[i]):
+ metric = intf_json["areas"][0]["circuits"][i]["interface"]["levels"][0][
+ "metric"
+ ]
+ if metric != expected_metrics[i]:
intf_name = intf_json["areas"][0]["circuits"][i]["interface"]["name"]
return "{} with expected metric {} on {} got {}".format(
router.name, expected_metrics[i], intf_name, metric
@@ -139,9 +139,7 @@ def _check_interface_metrics(router, expected_metrics):
def check_interface_metrics(router, expected_metrics):
"Verfiy metrics on router's isis interfaces"
- assertmsg = _check_interface_metrics(
- router, expected_metrics
- )
+ assertmsg = _check_interface_metrics(router, expected_metrics)
assert assertmsg is True, assertmsg
@@ -151,9 +149,7 @@ def _check_lsp_metrics(router, lsp, expected_metrics):
tgen = get_topogen()
router = tgen.gears[router]
logger.info(f"check_lsp_metrics {router}")
- isis_lsp_output = router.vtysh_cmd(
- "show isis database detail {}".format(lsp)
- )
+ isis_lsp_output = router.vtysh_cmd("show isis database detail {}".format(lsp))
metrics_list = [int(i) for i in re.findall(r"Metric: (\d+)", isis_lsp_output)]
if len(metrics_list) == 0:
@@ -170,9 +166,7 @@ def _check_lsp_metrics(router, lsp, expected_metrics):
def check_lsp_metrics(router, lsp, expected_metrics):
"Verfiy metrics on router's lsp"
- assertmsg = _check_lsp_metrics(
- router, lsp, expected_metrics
- )
+ assertmsg = _check_lsp_metrics(router, lsp, expected_metrics)
assert assertmsg is True, assertmsg
@@ -183,14 +177,12 @@ def _check_ip_route(router, destination, expected_interface):
tgen = get_topogen()
router = tgen.gears[router]
logger.info(f"check_ip_route {router}")
- route_output = router.vtysh_cmd(
- "show ip route {} json".format(destination)
- )
+ route_output = router.vtysh_cmd("show ip route {} json".format(destination))
route_json = json.loads(route_output)
interface = route_json[destination][0]["nexthops"][0]["interfaceName"]
- if (interface != expected_interface):
+ if interface != expected_interface:
return "{} with expected route to {} got {} expected {}".format(
router.name, destination, interface, expected_interface
)
@@ -201,9 +193,7 @@ def _check_ip_route(router, destination, expected_interface):
def check_ip_route(router, destination, expected_interface):
"Verfiy IS-IS route"
- assertmsg = _check_ip_route(
- router, destination, expected_interface
- )
+ assertmsg = _check_ip_route(router, destination, expected_interface)
assert assertmsg is True, assertmsg
@@ -216,9 +206,7 @@ def test_isis_daemon_up():
for router in ["r1", "r2", "r3", "r4"]:
r = tgen.gears[router]
- daemons = r.vtysh_cmd(
- "show daemons"
- )
+ daemons = r.vtysh_cmd("show daemons")
assert "isisd" in daemons
# Verify initial metric values.