diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-04-19 13:04:43 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-19 13:04:43 +0300 |
| commit | f5327fc339b05fb6fce51cf2feb0c8338b16747e (patch) | |
| tree | e7aaad2de7b75647cfe244c9d7a4695f7978c9da /zebra/zebra_evpn_mh.c | |
| parent | 5f771a2a70f76e3e7cc3b454793e74a1a93f0e68 (diff) | |
| parent | fff7545a03495b972a900676e256be381f9593b8 (diff) | |
Merge pull request #11012 from anlancs/bgpd-mh-simplify-condition
zebra: simplify one check for evpn-mh
Diffstat (limited to 'zebra/zebra_evpn_mh.c')
| -rw-r--r-- | zebra/zebra_evpn_mh.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/zebra/zebra_evpn_mh.c b/zebra/zebra_evpn_mh.c index 6c4e8b99f7..b1e48374c4 100644 --- a/zebra/zebra_evpn_mh.c +++ b/zebra/zebra_evpn_mh.c @@ -3761,18 +3761,10 @@ static inline bool zebra_evpn_mh_is_all_uplinks_down(void) static void zebra_evpn_mh_uplink_oper_flags_update(struct zebra_if *zif, bool set) { - if (set) { - if (if_is_operative(zif->ifp)) { - if (!(zif->flags & ZIF_FLAG_EVPN_MH_UPLINK_OPER_UP)) { - zif->flags |= ZIF_FLAG_EVPN_MH_UPLINK_OPER_UP; - ++zmh_info->uplink_oper_up_cnt; - } - } else { - if (zif->flags & ZIF_FLAG_EVPN_MH_UPLINK_OPER_UP) { - zif->flags &= ~ZIF_FLAG_EVPN_MH_UPLINK_OPER_UP; - if (zmh_info->uplink_oper_up_cnt) - --zmh_info->uplink_oper_up_cnt; - } + if (set && if_is_operative(zif->ifp)) { + if (!(zif->flags & ZIF_FLAG_EVPN_MH_UPLINK_OPER_UP)) { + zif->flags |= ZIF_FLAG_EVPN_MH_UPLINK_OPER_UP; + ++zmh_info->uplink_oper_up_cnt; } } else { if (zif->flags & ZIF_FLAG_EVPN_MH_UPLINK_OPER_UP) { |
