diff options
author | Paul Jakma <paul.jakma@sun.com> | 2006-09-07 00:24:49 +0000 |
---|---|---|
committer | Paul Jakma <paul.jakma@sun.com> | 2006-09-07 00:24:49 +0000 |
commit | 1a392d46db1917dfca2ddd06d7f0021396f8ecfa (patch) | |
tree | 8dec4a2e583c9a1890fd62d647dcd5a27d14bde1 /bgpd/bgp_nexthop.c | |
parent | ff7924f6c0437e2f3cc3710570414ae87a828724 (diff) |
[bgpd] Handle pcount as flags are changed, fixing pcount issues
2006-09-06 Paul Jakma <paul.jakma@sun.com>
* (general) Squash any and all prefix-count issues by
abstracting route flag changes, and maintaining count as and
when flags are modified (rather than relying on explicit
modifications of count being sprinkled in just the right
places throughout the code).
* bgp_route.c: (bgp_pcount_{dec,inc}rement) removed.
(bgp_pcount_adjust) new, update prefix count as
needed for a given route.
(bgp_info_{uns,s}et_flag) set/unset a BGP_INFO route status
flag, calling previous function when appropriate.
(general) Update all set/unsets of flags to use previous.
Remove pcount_{dec,inc}rement calls.
No need to unset BGP_INFO_VALID in places where
bgp_info_delete is called, it does that anyway.
* bgp_{damp,nexthop}.c: Update to use bgp_info_{un,}set_flag.
* bgp_route.h: Export bgp_info_{un,}set_flag.
Add a 'meta' BGP_INFO flag, BGP_INFO_UNUSEABLE.
Move BGP_INFO_HOLDDOWN macro to here from bgpd.h
Diffstat (limited to 'bgpd/bgp_nexthop.c')
-rw-r--r-- | bgpd/bgp_nexthop.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bgpd/bgp_nexthop.c b/bgpd/bgp_nexthop.c index ea707ccb..bfc41a18 100644 --- a/bgpd/bgp_nexthop.c +++ b/bgpd/bgp_nexthop.c @@ -478,11 +478,11 @@ bgp_scan (afi_t afi, safi_t safi) { bgp_aggregate_decrement (bgp, &rn->p, bi, afi, SAFI_UNICAST); - UNSET_FLAG (bi->flags, BGP_INFO_VALID); + bgp_info_unset_flag (rn, bi, BGP_INFO_VALID); } else { - SET_FLAG (bi->flags, BGP_INFO_VALID); + bgp_info_set_flag (rn, bi, BGP_INFO_VALID); bgp_aggregate_increment (bgp, &rn->p, bi, afi, SAFI_UNICAST); } |