diff options
author | paul <paul> | 2003-06-26 03:00:40 +0000 |
---|---|---|
committer | paul <paul> | 2003-06-26 03:00:40 +0000 |
commit | 8cb90ff71db7582d94790e68e807dcbba8a24767 (patch) | |
tree | ab91ec2b619e5d330a36d70deee47990effc2c0d | |
parent | 4eeccf18f357c87e5a973cac8d8d84d20c2f7890 (diff) |
2003-06-26: Mikael Lonnroth <gml@advancevpn.com>
* ospf_packet.c: (ospf_ls_upd_send_queue_event) clean up list node
and unlock lsa if we break early. (eg packet size too large).
-rw-r--r-- | ospfd/ospf_packet.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index e233ce0c..89d35c58 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -2708,7 +2708,12 @@ ospf_make_ls_upd (struct ospf_interface *oi, list update, struct stream *s) /* Check packet size. */ if (length + delta + ntohs (lsa->data->length) > OSPF_PACKET_MAX (oi)) - break; + { + /* clean up */ + list_delete_node (update, node); + ospf_lsa_unlock (lsa); + break; + } /* Keep pointer to LS age. */ lsah = (struct lsa_header *) (STREAM_DATA (s) + stream_get_putp (s)); |