Merge pull request #7208 from deastoe/zebra-fpm-blackhole-abort_7.4

[7.4] zebra: fix FPM abort for blackhole/unreach/prohibit routes
This commit is contained in:
Rafael Zalamena 2020-09-30 10:25:14 -03:00 committed by GitHub
commit c2213a2d7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -338,11 +338,19 @@ static int netlink_route_info_fill(netlink_route_info_t *ri, int cmd,
}
}
/* If there is no useful nexthop then return. */
if (ri->num_nhs == 0) {
zfpm_debug("netlink_encode_route(): No useful nexthop.");
switch (ri->rtm_type) {
case RTN_PROHIBIT:
case RTN_UNREACHABLE:
case RTN_BLACKHOLE:
break;
default:
/* If there is no useful nexthop then return. */
zfpm_debug(
"netlink_encode_route(): No useful nexthop.");
return 0;
}
}
return 1;
}