diff options
| author | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2019-10-11 16:13:24 -0300 |
|---|---|---|
| committer | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2019-10-11 16:13:24 -0300 |
| commit | ced291deb79f04ba7f6e17a0bbbc88fd95c47598 (patch) | |
| tree | b15e7813f6f602ece09618ffb5dc96782939cb83 /bfdd/ptm_adapter.c | |
| parent | 8ee0862e80da186dcae93311c22e17783cdd723c (diff) | |
bfdd: simplify session observers code
Don't be selective about what to observe, always observe all possible
aspects of the session that may change on run-time (i.e. bind address,
interface and VRF existence).
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Diffstat (limited to 'bfdd/ptm_adapter.c')
| -rw-r--r-- | bfdd/ptm_adapter.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/bfdd/ptm_adapter.c b/bfdd/ptm_adapter.c index 1b3219c235..df48bc2af0 100644 --- a/bfdd/ptm_adapter.c +++ b/bfdd/ptm_adapter.c @@ -579,8 +579,6 @@ static void bfdd_sessions_enable_interface(struct interface *ifp) TAILQ_FOREACH(bso, &bglobal.bg_obslist, bso_entry) { bs = bso->bso_bs; - if (bso->bso_isinterface == false) - continue; /* Interface name mismatch. */ if (strcmp(ifp->name, bs->key.ifname)) continue; @@ -605,10 +603,6 @@ static void bfdd_sessions_disable_interface(struct interface *ifp) struct bfd_session *bs; TAILQ_FOREACH(bso, &bglobal.bg_obslist, bso_entry) { - if (bso->bso_isinterface == false) - continue; - - /* Interface name mismatch. */ bs = bso->bso_bs; if (strcmp(ifp->name, bs->key.ifname)) continue; @@ -616,7 +610,6 @@ static void bfdd_sessions_disable_interface(struct interface *ifp) if (bs->sock == -1) continue; - /* Try to enable it. */ bfd_session_disable(bs); } @@ -658,8 +651,6 @@ void bfdd_sessions_disable_vrf(struct vrf *vrf) struct bfd_session *bs; TAILQ_FOREACH(bso, &bglobal.bg_obslist, bso_entry) { - if (bso->bso_isinterface) - continue; bs = bso->bso_bs; if (bs->key.vrfname[0] && strcmp(vrf->name, bs->key.vrfname)) @@ -668,7 +659,6 @@ void bfdd_sessions_disable_vrf(struct vrf *vrf) if (bs->sock == -1) continue; - /* Try to enable it. */ bfd_session_disable(bs); } } @@ -701,9 +691,6 @@ static void bfdd_sessions_enable_address(struct connected *ifc) struct prefix prefix; TAILQ_FOREACH(bso, &bglobal.bg_obslist, bso_entry) { - if (bso->bso_isaddress == false) - continue; - /* Skip enabled sessions. */ bs = bso->bso_bs; if (bs->sock != -1) |
