summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolodymyr Huti <v.huti@vyos.io>2023-10-10 19:10:18 +0300
committerVolodymyr Huti <v.huti@vyos.io>2023-10-10 20:01:17 +0300
commit8ddf6a713f2003ccccb884a8c436ffeb2fe34c62 (patch)
tree349ffc94f69861a2e68ea6197586c79c4cbc15a8
parent03d1b44c9bf8bce5486d2ecfff6f81ab28e8976c (diff)
eigrp: use correct memory pool on interface deletion
Trying to delete an interface during the test test_eigrp_topo1.py triggers a crash. ``` EIGRP: abort+0x12b EIGRP: _zlog_assert_failed+0x18c EIGRP: mt_count_free+0x56 EIGRP: qfree+0x2e EIGRP: eigrp_if_delete_hook+0x8c EIGRP: hook_call_if_del+0x5f EIGRP: if_delete_retain+0x1c EIGRP: if_delete+0xfb EIGRP: if_destroy_via_zapi+0x69 EIGRP: zclient_interface_delete+0x57 EIGRP: zclient_read+0x3d0 EIGRP: event_call+0xd8 EIGRP: frr_run+0x271 EIGRP: main+0x14b EIGRP: __libc_start_main+0xf3 EIGRP: _start+0x2e EIGRP: in thread zclient_read scheduled from lib/zclient.c:4514 zclient_event() ``` Signed-off-by: Volodymyr Huti <v.huti@vyos.io>
-rw-r--r--eigrpd/eigrp_interface.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/eigrpd/eigrp_interface.c b/eigrpd/eigrp_interface.c
index 2381977dba..7bb1617c19 100644
--- a/eigrpd/eigrp_interface.c
+++ b/eigrpd/eigrp_interface.c
@@ -43,8 +43,7 @@
#include "eigrpd/eigrp_types.h"
#include "eigrpd/eigrp_metric.h"
-DEFINE_MTYPE_STATIC(EIGRPD, EIGRP_IF, "EIGRP interface");
-DEFINE_MTYPE_STATIC(EIGRPD, EIGRP_IF_INFO, "EIGRP Interface Information");
+DEFINE_MTYPE_STATIC(EIGRPD, EIGRP_IF, "EIGRP interface");
struct eigrp_interface *eigrp_if_new(struct eigrp *eigrp, struct interface *ifp,
struct prefix *p)
@@ -110,7 +109,7 @@ int eigrp_if_delete_hook(struct interface *ifp)
eigrp_fifo_free(ei->obuf);
- XFREE(MTYPE_EIGRP_IF_INFO, ifp->info);
+ XFREE(MTYPE_EIGRP_IF, ifp->info);
return 0;
}