return (ifp->flags & (IFF_LOOPBACK | IFF_NOXMIT | IFF_VIRTUAL));
}
+/* Check interface is VRF */
+int if_is_vrf(struct interface *ifp)
+{
+ return CHECK_FLAG(ifp->status, ZEBRA_INTERFACE_VRF_LOOPBACK);
+}
+
/* Does this interface support broadcast ? */
int if_is_broadcast(struct interface *ifp)
{
QOBJ_FIELDS
};
+
RB_HEAD(if_name_head, interface);
RB_PROTOTYPE(if_name_head, interface, name_entry, if_cmp_func);
RB_HEAD(if_index_head, interface);
extern int if_is_operative(struct interface *);
extern int if_is_no_ptm_operative(struct interface *);
extern int if_is_loopback(struct interface *);
+extern int if_is_vrf(struct interface *ifp);
extern int if_is_broadcast(struct interface *);
extern int if_is_pointopoint(struct interface *);
extern int if_is_multicast(struct interface *);
if (oi->type == OSPF_IFTYPE_VIRTUALLINK)
continue;
- if (if_is_loopback(oi->ifp))
+ if (if_is_loopback(oi->ifp) || if_is_vrf(oi->ifp))
continue;
if (CHECK_FLAG(oi->connected->flags, ZEBRA_IFA_UNNUMBERED))
int ospf_if_is_enable(struct ospf_interface *oi)
{
- if (!if_is_loopback(oi->ifp))
+ if (!(if_is_loopback(oi->ifp) || if_is_vrf(oi->ifp)))
if (if_is_up(oi->ifp))
return 1;
{
if (if_is_pointopoint(ifp))
return OSPF_IFTYPE_POINTOPOINT;
- else if (if_is_loopback(ifp))
+ else if (if_is_loopback(ifp) || if_is_vrf(ifp))
return OSPF_IFTYPE_LOOPBACK;
else
return OSPF_IFTYPE_BROADCAST;