diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-03-07 21:15:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-07 21:15:23 +0100 |
commit | ae6ba9ba043652bde3b0000f5299eff31d351ee3 (patch) | |
tree | 4ef204cab9ce28af19cf481e0c21fc88a85c69fa /zebra/zebra_rnh.c | |
parent | Merge pull request #254 from donaldsharp/shutdown3 (diff) | |
parent | build: only default-enable nhrpd on Linux (diff) | |
download | frr-ae6ba9ba043652bde3b0000f5299eff31d351ee3.tar.xz frr-ae6ba9ba043652bde3b0000f5299eff31d351ee3.zip |
Merge pull request #257 from opensourcerouting/nhrpd
nhrpd
Diffstat (limited to 'zebra/zebra_rnh.c')
-rw-r--r-- | zebra/zebra_rnh.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c index f42354b6e..71ee8975b 100644 --- a/zebra/zebra_rnh.c +++ b/zebra/zebra_rnh.c @@ -376,19 +376,28 @@ zebra_rnh_resolve_entry (vrf_id_t vrfid, int family, rnh_type_t type, { if (CHECK_FLAG (rib->status, RIB_ENTRY_REMOVED)) continue; - if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_SELECTED)) + if (! CHECK_FLAG (rib->status, RIB_ENTRY_SELECTED_FIB)) + continue; + + if (CHECK_FLAG(rnh->flags, ZEBRA_NHT_CONNECTED)) { - if (CHECK_FLAG(rnh->flags, ZEBRA_NHT_CONNECTED)) + if (rib->type == ZEBRA_ROUTE_CONNECT) + break; + if (rib->type == ZEBRA_ROUTE_NHRP) { - if (rib->type == ZEBRA_ROUTE_CONNECT) + struct nexthop *nexthop; + for (nexthop = rib->nexthop; nexthop; nexthop = nexthop->next) + if (nexthop->type == NEXTHOP_TYPE_IFINDEX) + break; + if (nexthop) break; } - else if ((type == RNH_IMPORT_CHECK_TYPE) && - (rib->type == ZEBRA_ROUTE_BGP)) - continue; - else - break; } + else if ((type == RNH_IMPORT_CHECK_TYPE) && + (rib->type == ZEBRA_ROUTE_BGP)) + continue; + else + break; } } |