diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-10-29 13:51:57 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-10-29 14:48:02 +0100 |
commit | d4395853e8af1e21c86d4d9227e702640af58ab1 (patch) | |
tree | cb79fd10ae079b5b2517049519d521817b485ada /eigrpd/eigrp_query.c | |
parent | eigrpd: Fix crash in reply receive packet. (diff) | |
download | frr-d4395853e8af1e21c86d4d9227e702640af58ab1.tar.xz frr-d4395853e8af1e21c86d4d9227e702640af58ab1.zip |
eigrpd: When writing packet don't crash in some cases
When we are writing a packet if we have gotten ourselves
into a bad situation, note it and move on. Hopefully
dumping enough information so that we can find the offending
reason.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'eigrpd/eigrp_query.c')
-rw-r--r-- | eigrpd/eigrp_query.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/eigrpd/eigrp_query.c b/eigrpd/eigrp_query.c index 58f3d2b53..caa37870a 100644 --- a/eigrpd/eigrp_query.c +++ b/eigrpd/eigrp_query.c @@ -165,7 +165,7 @@ void eigrp_send_query(struct eigrp_interface *ei) struct listnode *node, *nnode, *node2, *nnode2; struct eigrp_neighbor *nbr; struct eigrp_prefix_entry *pe; - char has_tlv; + bool has_tlv = false; bool ep_saved = false; ep = eigrp_packet_new(ei->ifp->mtu, NULL); @@ -180,7 +180,6 @@ void eigrp_send_query(struct eigrp_interface *ei) length += eigrp_add_authTLV_MD5_to_stream(ep->s, ei); } - has_tlv = 0; for (ALL_LIST_ELEMENTS(ei->eigrp->topology_changes_internalIPV4, node, nnode, pe)) { if (!(pe->req_action & EIGRP_FSM_NEED_QUERY)) @@ -190,7 +189,7 @@ void eigrp_send_query(struct eigrp_interface *ei) for (ALL_LIST_ELEMENTS(ei->nbrs, node2, nnode2, nbr)) { if (nbr->state == EIGRP_NEIGHBOR_UP) { listnode_add(pe->rij, nbr); - has_tlv = 1; + has_tlv = true;; } } } |