diff options
author | Ondrej Filip <feela@network.cz> | 2000-05-30 18:49:48 +0200 |
---|---|---|
committer | Ondrej Filip <feela@network.cz> | 2000-05-30 18:49:48 +0200 |
commit | b477a9a855f75486c2e03bb7b68faba7923bc511 (patch) | |
tree | d2ea4f487692ac3cb84d3cb06f6e6acde5b5eb16 /proto | |
parent | e1e31816c4e6931465936afa39f5773cf4591b35 (diff) | |
download | bird-b477a9a855f75486c2e03bb7b68faba7923bc511.tar bird-b477a9a855f75486c2e03bb7b68faba7923bc511.zip |
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 33d8f98..1e70159 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 |