if (zapi_nexthop_decode(s, znh, 0, 0) < 0)
return -1;
+
+ if (znh->type == NEXTHOP_TYPE_BLACKHOLE) {
+ flog_warn(
+ EC_LIB_ZAPI_ENCODE,
+ "%s: Prefix %pFX has a blackhole nexthop which we cannot use for a label",
+ __func__, &zl->route.prefix);
+ return -1;
+ }
}
if (CHECK_FLAG(zl->message, ZAPI_LABELS_HAS_BACKUPS)) {
if (zapi_nexthop_decode(s, znh, 0, 0) < 0)
return -1;
+
+ if (znh->type == NEXTHOP_TYPE_BLACKHOLE) {
+ flog_warn(
+ EC_LIB_ZAPI_ENCODE,
+ "%s: Prefix %pFX has a backup blackhole nexthop which we cannot use for a label",
+ __func__, &zl->route.prefix);
+ return -1;
+ }
}
}