From af157fa3dbe2bba0674eb7634efd3ade6c89d604 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Fri, 26 Mar 2010 14:48:01 +0100 Subject: Disable multiple OSPF pseudointerfaces on BSD. --- proto/ospf/ospf.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'proto/ospf/ospf.h') diff --git a/proto/ospf/ospf.h b/proto/ospf/ospf.h index 9e02d75..ef51b9f 100644 --- a/proto/ospf/ospf.h +++ b/proto/ospf/ospf.h @@ -772,6 +772,25 @@ struct ospf_iface_patt #endif }; +#if defined(OSPFv2) && !defined(CONFIG_MC_PROPER_SRC) +static inline int +ospf_iface_stubby(struct ospf_iface_patt *ip, struct ifa *addr) +{ + /* + * We cannot properly support multiple OSPF ifaces on real iface + * with multiple prefixes, therefore we force OSPF ifaces with + * non-primary IP prefixes to be stub. + */ + return ip->stub || !(addr->flags & IA_PRIMARY); +} +#else +static inline int +ospf_iface_stubby(struct ospf_iface_patt *ip, struct ifa *addr UNUSED) +{ + return ip->stub; +} +#endif + int ospf_import_control(struct proto *p, rte **new, ea_list **attrs, struct linpool *pool); struct ea_list *ospf_make_tmp_attrs(struct rte *rt, struct linpool *pool); -- cgit v1.2.3