diff options
author | Ondrej Filip <feela@network.cz> | 2000-05-30 16:49:48 +0000 |
---|---|---|
committer | Ondrej Filip <feela@network.cz> | 2000-05-30 16:49:48 +0000 |
commit | b477a9a855f75486c2e03bb7b68faba7923bc511 (patch) | |
tree | d2ea4f487692ac3cb84d3cb06f6e6acde5b5eb16 /proto | |
parent | e1e31816c4e6931465936afa39f5773cf4591b35 (diff) |
Don't send empty LS upd. (And better debugging.)
Diffstat (limited to 'proto')
-rw-r--r-- | proto/ospf/lsupd.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/proto/ospf/lsupd.c b/proto/ospf/lsupd.c index 33d8f988..1e701597 100644 --- a/proto/ospf/lsupd.c +++ b/proto/ospf/lsupd.c @@ -206,12 +206,15 @@ ospf_lsupd_tx_list(struct ospf_neighbor *n, list *l) len+=en->lsa.length; lsano++; } - pk->lsano=htonl(lsano); - op->length=htons(len-SIPH); - ospf_pkt_finalize(n->ifa, op); + if(lsano>0) + { + 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); - sk_send_to(n->ifa->ip_sk,len-SIPH, n->ip, OSPF_PROTO); + 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); + } } void |