LSack receiving bugfix.
This commit is contained in:
parent
4bf41ac8b1
commit
ebff007f08
2 changed files with 6 additions and 3 deletions
|
@ -31,14 +31,16 @@ ospf_lsack_rx(struct ospf_lsack_packet *ps, struct proto *p,
|
||||||
|
|
||||||
if((n=find_neigh(ifa, nrid))==NULL)
|
if((n=find_neigh(ifa, nrid))==NULL)
|
||||||
{
|
{
|
||||||
debug("%s: Received lsack from unknown neigbor! (%u)\n", p->name,
|
debug("%s: Received lsack from unknown neigbor! (%I)\n", p->name,
|
||||||
nrid);
|
nrid);
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(n->state<NEIGHBOR_EXCHANGE) return;
|
||||||
|
|
||||||
nolsa=(ntohs(ps->ospf_packet.length)-sizeof(struct ospf_lsack_packet))/
|
nolsa=(ntohs(ps->ospf_packet.length)-sizeof(struct ospf_lsack_packet))/
|
||||||
sizeof(struct ospf_lsa_header);
|
sizeof(struct ospf_lsa_header);
|
||||||
DBG("Received %d lsa\n",nolsa);
|
DBG("Received %d lsa ack(s)\n",nolsa);
|
||||||
plsa=( struct ospf_lsa_header *)(ps+1);
|
plsa=( struct ospf_lsa_header *)(ps+1);
|
||||||
|
|
||||||
for(i=0;i<nolsa;i++)
|
for(i=0;i<nolsa;i++)
|
||||||
|
@ -52,7 +54,7 @@ ospf_lsack_rx(struct ospf_lsack_packet *ps, struct proto *p,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG("Deleting LS Id: %u RT: % Type: %u from LS Retl for neighbor %u\n",
|
DBG("Deleting LS Id: %I RT: %I Type: %u from LS Retl for neighbor %I\n",
|
||||||
lsa.id,lsa.rt,lsa.type,n->rid);
|
lsa.id,lsa.rt,lsa.type,n->rid);
|
||||||
s_rem_node(SNODE en);
|
s_rem_node(SNODE en);
|
||||||
ospf_hash_delete(n->lsrth,en);
|
ospf_hash_delete(n->lsrth,en);
|
||||||
|
|
|
@ -149,6 +149,7 @@ ospf_rx_hook(sock *sk, int size)
|
||||||
break;
|
break;
|
||||||
case LSACK:
|
case LSACK:
|
||||||
DBG("%s: Link state ack received.\n", p->name);
|
DBG("%s: Link state ack received.\n", p->name);
|
||||||
|
ospf_lsack_rx((struct ospf_lsack_packet *)ps, p, ifa, size);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
log("%s: Bad packet received: wrong type %u", p->name, ps->type);
|
log("%s: Bad packet received: wrong type %u", p->name, ps->type);
|
||||||
|
|
Loading…
Reference in a new issue