summaryrefslogtreecommitdiffstats
path: root/proto/ospf/dbdes.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2009-12-11 01:20:53 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2009-12-11 11:06:51 +0100
commit8a70a13e7e79afa6818b10cf64d4f1ae4cf89e4b (patch)
treec674a054dd38aebc945a7a53c6f61539d70a01fc /proto/ospf/dbdes.c
parentbe2d38b7e977c1f72ed9cd52f8e3e85130c0aaa1 (diff)
downloadbird-8a70a13e7e79afa6818b10cf64d4f1ae4cf89e4b.tar
bird-8a70a13e7e79afa6818b10cf64d4f1ae4cf89e4b.zip
Implements protocol-specific Router ID for OSPF.
And fixes one minor bug.
Diffstat (limited to 'proto/ospf/dbdes.c')
-rw-r--r--proto/ospf/dbdes.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/proto/ospf/dbdes.c b/proto/ospf/dbdes.c
index 2cb2dd8..a249d75 100644
--- a/proto/ospf/dbdes.c
+++ b/proto/ospf/dbdes.c
@@ -247,8 +247,8 @@ void
ospf_dbdes_receive(struct ospf_packet *ps_i, struct ospf_iface *ifa,
struct ospf_neighbor *n)
{
- struct proto *p = &ifa->oa->po->proto;
- u32 myrid = p->cf->global->router_id;
+ struct proto_ospf *po = ifa->oa->po;
+ struct proto *p = &po->proto;
unsigned int size = ntohs(ps_i->length);
if (size < sizeof(struct ospf_dbdes_packet))
@@ -278,7 +278,7 @@ ospf_dbdes_receive(struct ospf_packet *ps_i, struct ospf_iface *ifa,
return;
case NEIGHBOR_EXSTART:
if ((ps->imms.bit.m && ps->imms.bit.ms && ps->imms.bit.i)
- && (n->rid > myrid) && (size == sizeof(struct ospf_dbdes_packet)))
+ && (n->rid > po->router_id) && (size == sizeof(struct ospf_dbdes_packet)))
{
/* I'm slave! */
n->dds = ps_ddseq;
@@ -293,7 +293,7 @@ ospf_dbdes_receive(struct ospf_packet *ps_i, struct ospf_iface *ifa,
}
if (((ps->imms.bit.i == 0) && (ps->imms.bit.ms == 0)) &&
- (n->rid < myrid) && (n->dds == ps_ddseq))
+ (n->rid < po->router_id) && (n->dds == ps_ddseq))
{
/* I'm master! */
n->options = ps_options;