From: Ondrej Filip Date: Tue, 30 May 2000 16:49:48 +0000 (+0000) Subject: Don't send empty LS upd. (And better debugging.) X-Git-Tag: v1.2.0~790 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b477a9a855f75486c2e03bb7b68faba7923bc511;p=thirdparty%2Fbird.git Don't send empty LS upd. (And better debugging.) --- diff --git a/proto/ospf/lsupd.c b/proto/ospf/lsupd.c index 33d8f988c..1e701597d 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