Another bugfix. (In EXCHANGE state.)
This commit is contained in:
parent
e17baa3108
commit
2af2636a69
1 changed files with 29 additions and 30 deletions
|
@ -58,18 +58,18 @@ ospf_pkt_finalize(struct ospf_iface *ifa, struct ospf_packet *pkt)
|
|||
}
|
||||
|
||||
void
|
||||
ospf_dbdes_tx(struct ospf_iface *ifa)
|
||||
ospf_dbdes_tx(struct ospf_neighbor *n)
|
||||
{
|
||||
struct ospf_dbdes_packet *pkt;
|
||||
struct ospf_packet *op;
|
||||
struct ospf_neighbor *n;
|
||||
struct ospf_iface *ifa;
|
||||
u16 length;
|
||||
struct proto *p;
|
||||
|
||||
ifa=n->ifa;
|
||||
|
||||
p=(struct proto *)(ifa->proto);
|
||||
|
||||
WALK_LIST (n, ifa->neigh_list) /* Try to send db_des */
|
||||
{
|
||||
switch(n->state)
|
||||
{
|
||||
case NEIGHBOR_EXSTART: /* Send empty packets */
|
||||
|
@ -91,7 +91,6 @@ ospf_dbdes_tx(struct ospf_iface *ifa)
|
|||
default: /* Ignore it */
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -99,12 +98,16 @@ rxmt_timer_hook(timer *timer)
|
|||
{
|
||||
struct ospf_iface *ifa;
|
||||
struct proto *p;
|
||||
struct ospf_neighbor *n;
|
||||
|
||||
ifa=(struct ospf_iface *)timer->data;
|
||||
p=(struct proto *)(ifa->proto);
|
||||
debug("%s: RXMT timer fired on interface %s.\n",
|
||||
p->name, ifa->iface->name);
|
||||
ospf_dbdes_tx(ifa);
|
||||
WALK_LIST (n, ifa->neigh_list) /* Try to send db_des */
|
||||
{
|
||||
ospf_dbdes_tx(n);
|
||||
}
|
||||
}
|
||||
|
||||
struct ospf_neighbor *
|
||||
|
@ -659,16 +662,12 @@ ospf_dbdes_rx(struct ospf_dbdes_packet *ps, struct proto *p,
|
|||
{
|
||||
/* Duplicate packet */
|
||||
debug("%s: Received duplicate dbdes from (%u)!\n", p->name, nrid);
|
||||
if(IAMMASTER(n->imms))
|
||||
if(!IAMMASTER(n->imms))
|
||||
{
|
||||
return;
|
||||
ospf_dbdes_tx(n);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* FIXME: Send response! */
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(IAMMASTER(ps->imms)!=IAMMASTER(n->myimms)) /* M/S bit differs */
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue