diff options
author | Donald Sharp <donaldsharp72@gmail.com> | 2021-11-22 18:02:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-22 18:02:21 +0100 |
commit | 9d5a61264ac44d82e63fb57d3e72305127ecbeab (patch) | |
tree | 5da1c6475bb4615dc3f7ce401cf0ccb8bb2b8842 /lib/if.c | |
parent | Merge pull request #10070 from idryzhov/ospf6-memcmp-cleanup (diff) | |
parent | *: unify if_is_loopback/if_is_loopback_or_vrf (diff) | |
download | frr-9d5a61264ac44d82e63fb57d3e72305127ecbeab.tar.xz frr-9d5a61264ac44d82e63fb57d3e72305127ecbeab.zip |
Merge pull request #10076 from idryzhov/if-is-loopback-or-vrf
*: unify if_is_loopback/if_is_loopback_or_vrf
Diffstat (limited to 'lib/if.c')
-rw-r--r-- | lib/if.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -713,7 +713,7 @@ int if_is_no_ptm_operative(const struct interface *ifp) } /* Is this loopback interface ? */ -int if_is_loopback(const struct interface *ifp) +int if_is_loopback_exact(const struct interface *ifp) { /* XXX: Do this better, eg what if IFF_WHATEVER means X on platform M * but Y on platform N? @@ -727,9 +727,10 @@ int if_is_vrf(const struct interface *ifp) return CHECK_FLAG(ifp->status, ZEBRA_INTERFACE_VRF_LOOPBACK); } -bool if_is_loopback_or_vrf(const struct interface *ifp) +/* Should this interface be treated as a loopback? */ +bool if_is_loopback(const struct interface *ifp) { - if (if_is_loopback(ifp) || if_is_vrf(ifp)) + if (if_is_loopback_exact(ifp) || if_is_vrf(ifp)) return true; return false; |