diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2010-02-07 09:49:34 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2010-02-07 09:49:34 +0100 |
commit | aa80826e4af4e6e0a6de5604ab5ce7991f2a8b4e (patch) | |
tree | 14d346ca15afa0acc6a7d8c8605fe9d44a77bdfa /proto | |
parent | 76b53a4e207696c535a45f4358a8e047ca936e45 (diff) | |
download | bird-aa80826e4af4e6e0a6de5604ab5ce7991f2a8b4e.tar bird-aa80826e4af4e6e0a6de5604ab5ce7991f2a8b4e.zip |
Unnumbered OSPF interfaces should be always in the point-to-point mode.
Diffstat (limited to 'proto')
-rw-r--r-- | proto/ospf/iface.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/proto/ospf/iface.c b/proto/ospf/iface.c index b90ab9f..927b8da 100644 --- a/proto/ospf/iface.c +++ b/proto/ospf/iface.c @@ -355,6 +355,9 @@ ospf_open_mc_socket(struct ospf_iface *ifa) u8 ospf_iface_clasify(struct iface * ifa) { + if (ifa->addr->flags & IA_UNNUMBERED) + return OSPF_IT_PTP; + if ((ifa->flags & (IF_MULTIACCESS | IF_MULTICAST)) == (IF_MULTIACCESS | IF_MULTICAST)) return OSPF_IT_BCAST; @@ -458,6 +461,16 @@ ospf_iface_new(struct proto_ospf *po, struct iface *iface, else ifa->type = ip->type; +#ifdef OSPFv2 + if ((ifa->type != OSPF_IT_PTP) && (ifa->type != OSPF_IT_VLINK) && + (ifa->iface->addr->flags & IA_UNNUMBERED)) + { + log(L_WARN "%s: Missing proper IP prefix on interface %s, forcing point-to-point mode", + p->name, iface->name); + ifa->type = OSPF_IT_PTP; + } +#endif + init_list(&ifa->neigh_list); init_list(&ifa->nbma_list); |