diff options
author | Igor Ryzhov <iryzhov@nfware.com> | 2021-09-30 11:31:05 +0200 |
---|---|---|
committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-09-30 11:31:05 +0200 |
commit | ef322b022fa1bd961132cc8f1e818922f5d30962 (patch) | |
tree | a9ed349dff9343f0d3839815fe5c0c685b9038a1 /ospfd/ospf_interface.c | |
parent | Merge pull request #9560 from LabNConsulting/ziemba/frrmod_load-error-messages (diff) | |
download | frr-ef322b022fa1bd961132cc8f1e818922f5d30962.tar.xz frr-ef322b022fa1bd961132cc8f1e818922f5d30962.zip |
*: cleanup interface loopback/vrf check
There's a helper function to check whether the interface is loopback or
VRF - if_is_loopback_or_vrf. Let's use it whenever we need to check that.
There's no functional change in this commit.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'ospfd/ospf_interface.c')
-rw-r--r-- | ospfd/ospf_interface.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c index eb7a8348e..81cc34600 100644 --- a/ospfd/ospf_interface.c +++ b/ospfd/ospf_interface.c @@ -477,7 +477,7 @@ struct ospf_interface *ospf_if_lookup_recv_if(struct ospf *ospf, if (oi->type == OSPF_IFTYPE_VIRTUALLINK) continue; - if (if_is_loopback(oi->ifp) || if_is_vrf(oi->ifp)) + if (if_is_loopback_or_vrf(oi->ifp)) continue; if (CHECK_FLAG(oi->connected->flags, ZEBRA_IFA_UNNUMBERED)) @@ -719,7 +719,7 @@ static int ospf_if_delete_hook(struct interface *ifp) int ospf_if_is_enable(struct ospf_interface *oi) { - if (!(if_is_loopback(oi->ifp) || if_is_vrf(oi->ifp))) + if (!(if_is_loopback_or_vrf(oi->ifp))) if (if_is_up(oi->ifp)) return 1; @@ -1291,7 +1291,7 @@ uint8_t ospf_default_iftype(struct interface *ifp) { if (if_is_pointopoint(ifp)) return OSPF_IFTYPE_POINTOPOINT; - else if (if_is_loopback(ifp) || if_is_vrf(ifp)) + else if (if_is_loopback_or_vrf(ifp)) return OSPF_IFTYPE_LOOPBACK; else return OSPF_IFTYPE_BROADCAST; |