diff options
| author | Lou Berger <lberger@labn.net> | 2017-08-22 09:01:20 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-22 09:01:20 -0400 |
| commit | 3f543889568e7f267f6f6d1e919eeb31a21ee97f (patch) | |
| tree | 6f330f0e8034c81ccd0777d232c34262df8b715a /zebra/zebra_rib.c | |
| parent | 57a553fd9c1eab1adc15ca31af29cbbd67db4dfc (diff) | |
| parent | 19aad877b70501d759b9326e9736aa23ca16d578 (diff) | |
Merge pull request #939 from jbonor/optimization
Optimization
Diffstat (limited to 'zebra/zebra_rib.c')
| -rw-r--r-- | zebra/zebra_rib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index ed53554265..dc61ea5e40 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -1820,7 +1820,7 @@ void rib_queue_add(struct route_node *rn) * holder, if necessary, then push the work into it in any case. * This semantics was introduced after 0.99.9 release. */ - if (!zebrad.ribq->items->count) + if (work_queue_empty(zebrad.ribq)) work_queue_add(zebrad.ribq, zebrad.mq); rib_meta_queue_add(zebrad.mq, rn); @@ -2352,7 +2352,7 @@ void rib_delete(afi_t afi, safi_t safi, vrf_id_t vrf_id, int type, break; } for (ALL_NEXTHOPS(re->nexthop, nexthop)) - if (IPV4_ADDR_SAME(&nexthop->gate.ipv4, gate) + if (IPV4_ADDR_SAME(&nexthop->gate.ipv4, &gate->ipv4) || IPV6_ADDR_SAME(&nexthop->gate.ipv6, gate)) { same = re; |
