eigrpd: Don't crash on a no network A.B.C.D/M

This command was crashing.  This fixes the crash
we are still not behaving quite correctly on
handling routes we have learned from those peers
covered by the network statement.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2019-02-03 19:24:28 -05:00
parent 1313365236
commit c45db77d6f

View File

@ -114,6 +114,8 @@ int eigrp_if_delete_hook(struct interface *ifp)
eigrp = ei->eigrp;
listnode_delete(eigrp->eiflist, ei);
eigrp_fifo_free(ei->obuf);
XFREE(MTYPE_EIGRP_IF_INFO, ifp->info);
ifp->info = NULL;
@ -265,16 +267,11 @@ void eigrp_if_stream_unset(struct eigrp_interface *ei)
{
struct eigrp *eigrp = ei->eigrp;
if (ei->obuf) {
eigrp_fifo_free(ei->obuf);
ei->obuf = NULL;
if (ei->on_write_q) {
listnode_delete(eigrp->oi_write_q, ei);
if (list_isempty(eigrp->oi_write_q))
thread_cancel(eigrp->t_write);
ei->on_write_q = 0;
}
if (ei->on_write_q) {
listnode_delete(eigrp->oi_write_q, ei);
if (list_isempty(eigrp->oi_write_q))
thread_cancel(eigrp->t_write);
ei->on_write_q = 0;
}
}
@ -351,7 +348,6 @@ void eigrp_if_free(struct eigrp_interface *ei, int source)
eigrp_if_down(ei);
list_delete(&ei->nbrs);
listnode_delete(ei->eigrp->eiflist, ei);
}