summaryrefslogtreecommitdiff
path: root/proto/ospf/neighbor.c
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2004-07-14 21:46:20 +0000
committerOndrej Filip <feela@network.cz>2004-07-14 21:46:20 +0000
commit3b16080c97a2d89c90f7df7a8fda0401ec9abe42 (patch)
treeef885699eaa72453b99f40dba181112d7e9540b7 /proto/ospf/neighbor.c
parenta417ad13a117d2458702cbec4aa418ba99981611 (diff)
Multiple OSPF areas can be attached.
Origination of summary LSA works. Routing table calculation works. Virtual links works. Well, I hope, OSPF is fully compatible with RFC2328!!!!
Diffstat (limited to 'proto/ospf/neighbor.c')
-rw-r--r--proto/ospf/neighbor.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/proto/ospf/neighbor.c b/proto/ospf/neighbor.c
index e9ef4761..869db2b7 100644
--- a/proto/ospf/neighbor.c
+++ b/proto/ospf/neighbor.c
@@ -122,6 +122,7 @@ neigh_chstate(struct ospf_neighbor *n, u8 state)
{
ifa->fadj++;
schedule_rt_lsa(ifa->oa);
+ if (ifa->type == OSPF_IT_VLINK) schedule_rt_lsa(ifa->voa);
schedule_net_lsa(ifa);
}
if (state == NEIGHBOR_EXSTART)
@@ -422,12 +423,12 @@ bdr_election(struct ospf_iface *ifa)
|| ((ifa->bdrid != myid) && (nbdr == &me)))
{
if (ndr == NULL)
- ifa->drip = me.dr = ipa_from_u32(0);
+ ifa->drip = me.dr = IPA_NONE;
else
ifa->drip = me.dr = ndr->ip;
if (nbdr == NULL)
- ifa->bdrip = me.bdr = ipa_from_u32(0);
+ ifa->bdrip = me.bdr = IPA_NONE;
else
ifa->bdrip = me.bdr = nbdr->ip;
@@ -436,12 +437,12 @@ bdr_election(struct ospf_iface *ifa)
}
if (ndr == NULL)
- ndrip = ipa_from_u32(0);
+ ndrip = IPA_NONE;
else
ndrip = ndr->ip;
if (nbdr == NULL)
- nbdrip = ipa_from_u32(0);
+ nbdrip = IPA_NONE;
else
nbdrip = nbdr->ip;
@@ -453,7 +454,7 @@ bdr_election(struct ospf_iface *ifa)
if (ndr == NULL)
{
ifa->drid = 0;
- ifa->drip = ipa_from_u32(0);
+ ifa->drip = IPA_NONE;
}
else
{
@@ -464,7 +465,7 @@ bdr_election(struct ospf_iface *ifa)
if (nbdr == NULL)
{
ifa->bdrid = 0;
- ifa->bdrip = ipa_from_u32(0);
+ ifa->bdrip = IPA_NONE;
}
else
{
@@ -591,11 +592,12 @@ ospf_sh_neigh_info(struct ospf_neighbor *n)
pos = "dr ";
if (n->rid == ifa->bdrid)
pos = "bdr ";
- if (n->ifa->type == OSPF_IT_PTP)
+ if ((n->ifa->type == OSPF_IT_PTP) || (n->ifa->type == OSPF_IT_VLINK))
pos = "ptp ";
cli_msg(-1013, "%-1I\t%3u\t%s/%s\t%-5s\t%-1I\t%-10s", n->rid, n->priority,
- ospf_ns[n->state], pos, etime, n->ip, ifa->iface->name);
+ ospf_ns[n->state], pos, etime, n->ip,
+ (ifa->type == OSPF_IT_VLINK ? "vlink" : ifa->iface->name));
}
void