summaryrefslogtreecommitdiff
path: root/proto/ospf
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2010-01-03 12:17:52 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2010-01-03 12:17:52 +0100
commitcf31112f0d7618464097f71228f84bd534f1bc0f (patch)
tree68f7fa93bd2154a16169b4db3dc9c16e51c2e84f /proto/ospf
parent610bb3cff05f6d5b09c77724bc97295b809d15e2 (diff)
Implements MRTdump feature.
Diffstat (limited to 'proto/ospf')
-rw-r--r--proto/ospf/iface.c9
-rw-r--r--proto/ospf/neighbor.c6
-rw-r--r--proto/ospf/ospf.c4
-rw-r--r--proto/ospf/topology.c6
4 files changed, 15 insertions, 10 deletions
diff --git a/proto/ospf/iface.c b/proto/ospf/iface.c
index 8db086ec..e514a5d5 100644
--- a/proto/ospf/iface.c
+++ b/proto/ospf/iface.c
@@ -152,9 +152,12 @@ ospf_iface_chstate(struct ospf_iface *ifa, u8 state)
if ((ifa->type != OSPF_IT_NBMA) && (ifa->ioprob == OSPF_I_OK) &&
((state == OSPF_IS_BACKUP) || (state == OSPF_IS_DR)))
{
- /* FIXME some error handing ? */
- sk_join_group(ifa->sk, AllDRouters);
- ifa->dr_up = 1;
+ if (!ifa->dr_up == 0)
+ {
+ /* FIXME some error handing ? */
+ sk_join_group(ifa->sk, AllDRouters);
+ ifa->dr_up = 1;
+ }
}
else if (ifa->dr_up)
{
diff --git a/proto/ospf/neighbor.c b/proto/ospf/neighbor.c
index ba8d7b98..0411d48e 100644
--- a/proto/ospf/neighbor.c
+++ b/proto/ospf/neighbor.c
@@ -623,9 +623,9 @@ ospf_sh_neigh_info(struct ospf_neighbor *n)
if ((n->ifa->type == OSPF_IT_PTP) || (n->ifa->type == OSPF_IT_VLINK))
pos = "ptp ";
- cli_msg(-1013, "%-1R\t%3u\t%s/%s\t%-5s\t%-1I\t%-10s", n->rid, n->priority,
- ospf_ns[n->state], pos, etime, n->ip,
- (ifa->type == OSPF_IT_VLINK ? "vlink" : ifa->iface->name));
+ cli_msg(-1013, "%-1R\t%3u\t%s/%s\t%-5s\t%-10s %-1I", n->rid, n->priority,
+ ospf_ns[n->state], pos, etime,
+ (ifa->type == OSPF_IT_VLINK ? "vlink" : ifa->iface->name), n->ip);
}
static void
diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c
index 9ebef6b7..232803d7 100644
--- a/proto/ospf/ospf.c
+++ b/proto/ospf/ospf.c
@@ -917,8 +917,8 @@ ospf_sh_neigh(struct proto *p, char *iff)
}
cli_msg(-1013, "%s:", p->name);
- cli_msg(-1013, "%-12s\t%3s\t%-15s\t%-5s\t%-12s\t%-10s", "Router ID", "Pri",
- " State", "DTime", "Router IP", "Interface");
+ cli_msg(-1013, "%-12s\t%3s\t%-15s\t%-5s\t%-10s %-12s", "Router ID", "Pri",
+ " State", "DTime", "Interface", "Router IP");
WALK_LIST(ifa, po->iface_list)
if ((iff == NULL) || patmatch(iff, ifa->iface->name))
WALK_LIST(n, ifa->neigh_list)
diff --git a/proto/ospf/topology.c b/proto/ospf/topology.c
index 3ca5e774..870c0bc2 100644
--- a/proto/ospf/topology.c
+++ b/proto/ospf/topology.c
@@ -433,9 +433,11 @@ originate_rt_lsa(struct ospf_area *oa)
#ifdef OSPFv2
lsa.options = oa->options;
-#endif
-
lsa.id = po->router_id;
+#else /* OSPFv3 */
+ lsa.id = 0;
+#endif
+
lsa.rt = po->router_id;
lsa.sn = oa->rt ? (oa->rt->lsa.sn + 1) : LSA_INITSEQNO;
u32 dom = oa->areaid;