Don't send empty LS upd. (And better debugging.)
This commit is contained in:
parent
e1e31816c4
commit
b477a9a855
1 changed files with 8 additions and 5 deletions
|
@ -206,12 +206,15 @@ ospf_lsupd_tx_list(struct ospf_neighbor *n, list *l)
|
||||||
len+=en->lsa.length;
|
len+=en->lsa.length;
|
||||||
lsano++;
|
lsano++;
|
||||||
}
|
}
|
||||||
pk->lsano=htonl(lsano);
|
if(lsano>0)
|
||||||
op->length=htons(len-SIPH);
|
{
|
||||||
ospf_pkt_finalize(n->ifa, op);
|
pk->lsano=htonl(lsano);
|
||||||
|
op->length=htons(len-SIPH);
|
||||||
|
ospf_pkt_finalize(n->ifa, op);
|
||||||
|
|
||||||
debug("%s: LS upd sent to %I (%d LSAs)\n", p->name, n->ip, lsano);
|
debug("%s: LS upd sent to %I (%d LSAs)\n", p->name, n->ip, lsano);
|
||||||
sk_send_to(n->ifa->ip_sk,len-SIPH, n->ip, OSPF_PROTO);
|
sk_send_to(n->ifa->ip_sk,len-SIPH, n->ip, OSPF_PROTO);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue