]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Don't send empty LS upd. (And better debugging.)
authorOndrej Filip <feela@network.cz>
Tue, 30 May 2000 16:49:48 +0000 (16:49 +0000)
committerOndrej Filip <feela@network.cz>
Tue, 30 May 2000 16:49:48 +0000 (16:49 +0000)
proto/ospf/lsupd.c

index 33d8f988c01c4cf0290c98acb42c101aba752c0c..1e701597d963fb73dbf349ce43aa6eb48cd11f29 100644 (file)
@@ -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