summaryrefslogtreecommitdiffstats
path: root/proto/ospf
diff options
context:
space:
mode:
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 8db086e..e514a5d 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 ba8d7b9..0411d48 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 9ebef6b..232803d 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 3ca5e77..870c0bc 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;