diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2020-09-29 13:47:38 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-29 13:47:38 -0400 |
| commit | dbbae374d49a5a449211f4dcb5122ab8db2cf511 (patch) | |
| tree | cceacc3c69ef61bd9c2a80d2ac82288c450cb954 | |
| parent | e587774b74d05e2b22bf179fdee7a829f2912e25 (diff) | |
| parent | 94f7786375030e08063cdae5b4577edf26adb456 (diff) | |
Merge pull request #7192 from deastoe/zebra-fpm-blackhole-abort
zebra: fix FPM abort for unreach/prohibit routes
| -rw-r--r-- | zebra/zebra_fpm_netlink.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/zebra/zebra_fpm_netlink.c b/zebra/zebra_fpm_netlink.c index 3e11d53b16..2c07413638 100644 --- a/zebra/zebra_fpm_netlink.c +++ b/zebra/zebra_fpm_netlink.c @@ -335,10 +335,18 @@ static int netlink_route_info_fill(struct netlink_route_info *ri, int cmd, } } - /* If there is no useful nexthop then return. */ - if (ri->rtm_type != RTN_BLACKHOLE && ri->num_nhs == 0) { - zfpm_debug("netlink_encode_route(): No useful nexthop."); - return 0; + if (ri->num_nhs == 0) { + 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; |
