summaryrefslogtreecommitdiff
path: root/proto/ospf
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2000-05-30 16:49:48 +0000
committerOndrej Filip <feela@network.cz>2000-05-30 16:49:48 +0000
commitb477a9a855f75486c2e03bb7b68faba7923bc511 (patch)
treed2ea4f487692ac3cb84d3cb06f6e6acde5b5eb16 /proto/ospf
parente1e31816c4e6931465936afa39f5773cf4591b35 (diff)
Don't send empty LS upd. (And better debugging.)
Diffstat (limited to 'proto/ospf')
-rw-r--r--proto/ospf/lsupd.c13
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