summaryrefslogtreecommitdiffstats
path: root/proto/ospf/iface.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2011-03-28 22:46:18 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2011-03-28 22:46:18 +0200
commit52a43ae3b76f86b697537bc3ad8afdb3b421cf2c (patch)
tree15a006b41f3e166c75f46f1ea45cc4fcb1502f5d /proto/ospf/iface.c
parentc454872f4e81e69a8e9950289ab810fcac3fc922 (diff)
downloadbird-52a43ae3b76f86b697537bc3ad8afdb3b421cf2c.tar
bird-52a43ae3b76f86b697537bc3ad8afdb3b421cf2c.zip
Minor changes in addresses.
Mainly changes IA_UNNUMBERED to IA_PEER and adds IA_HOST. Also do not show broadcast addr in show interfaces. Nobody cares for that.
Diffstat (limited to 'proto/ospf/iface.c')
-rw-r--r--proto/ospf/iface.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/proto/ospf/iface.c b/proto/ospf/iface.c
index faee634..7889944 100644
--- a/proto/ospf/iface.c
+++ b/proto/ospf/iface.c
@@ -443,6 +443,10 @@ ospf_iface_stubby(struct ospf_iface_patt *ip, struct ifa *addr)
if (! addr)
return 0;
+ /* a host/loopback address */
+ if (addr->flags & IA_HOST)
+ return 1;
+
/*
* We cannot properly support multiple OSPF ifaces on real iface
* with multiple prefixes, therefore we force OSPF ifaces with
@@ -453,10 +457,6 @@ ospf_iface_stubby(struct ospf_iface_patt *ip, struct ifa *addr)
return 1;
#endif
- /* a loopback/dummy address */
- if ((addr->pxlen == MAX_PREFIX_LENGTH) && ipa_zero(addr->opposite))
- return 1;
-
return ip->stub;
}
@@ -522,10 +522,10 @@ ospf_iface_new(struct ospf_area *oa, struct ifa *addr, struct ospf_iface_patt *i
int old_type = ifa->type;
#ifdef OSPFv2
- if ((ifa->type == OSPF_IT_BCAST) && (addr->flags & IA_UNNUMBERED))
+ if ((ifa->type == OSPF_IT_BCAST) && (addr->flags & IA_PEER))
ifa->type = OSPF_IT_PTP;
- if ((ifa->type == OSPF_IT_NBMA) && (addr->flags & IA_UNNUMBERED))
+ if ((ifa->type == OSPF_IT_NBMA) && (addr->flags & IA_PEER))
ifa->type = OSPF_IT_PTMP;
#endif
@@ -1115,7 +1115,7 @@ ospf_iface_info(struct ospf_iface *ifa)
else
{
#ifdef OSPFv2
- if (ifa->addr->flags & IA_UNNUMBERED)
+ if (ifa->addr->flags & IA_PEER)
cli_msg(-1015, "Interface %s (peer %I)", ifa->iface->name, ifa->addr->opposite);
else
cli_msg(-1015, "Interface %s (%I/%d)", ifa->iface->name, ifa->addr->prefix, ifa->addr->pxlen);