diff options
| author | vivek <vivek@cumulusnetworks.com> | 2018-08-27 22:13:30 +0000 |
|---|---|---|
| committer | vivek <vivek@cumulusnetworks.com> | 2018-08-27 22:13:30 +0000 |
| commit | f190902f523abaa1035cbbb385387bc6c72dd1dc (patch) | |
| tree | 9472de5fb49314eba45868ed7b66376f7329b2fe /lib/if.c | |
| parent | 9df2b997b975c7a7807e9e491989d5123d87458f (diff) | |
| parent | 95d8c3ce78cdd800f4c39d196e865c2ec9213f03 (diff) | |
Merge remote-tracking branch 'upstream/master' into evpn-extended-mobility
Conflicts:
zebra/zebra_vxlan.c
Diffstat (limited to 'lib/if.c')
| -rw-r--r-- | lib/if.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -393,7 +393,8 @@ struct interface *if_get_by_name(const char *name, vrf_id_t vrf_id, int vty) * this should not be considered as an update * then create the new interface */ - if (ifp->vrf_id != vrf_id && vrf_is_mapped_on_netns(vrf_id)) + if (ifp->vrf_id != vrf_id && vrf_is_mapped_on_netns( + vrf_lookup_by_id(vrf_id))) return if_create(name, vrf_id); /* If it came from the kernel * or by way of zclient, believe it and update @@ -471,6 +472,14 @@ int if_is_vrf(struct interface *ifp) return CHECK_FLAG(ifp->status, ZEBRA_INTERFACE_VRF_LOOPBACK); } +bool if_is_loopback_or_vrf(struct interface *ifp) +{ + if (if_is_loopback(ifp) || if_is_vrf(ifp)) + return true; + + return false; +} + /* Does this interface support broadcast ? */ int if_is_broadcast(struct interface *ifp) { @@ -1140,7 +1149,7 @@ const char *if_link_type_str(enum zebra_link_type llt) llts(ZEBRA_LLT_IEEE802154, "IEEE 802.15.4"); llts(ZEBRA_LLT_IEEE802154_PHY, "IEEE 802.15.4 Phy"); default: - zlog_warn("Unknown value %d", llt); + flog_err(LIB_ERR_DEVELOPMENT, "Unknown value %d", llt); return "Unknown type!"; #undef llts } |
