summaryrefslogtreecommitdiff
path: root/proto
diff options
context:
space:
mode:
Diffstat (limited to 'proto')
-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