pimd: Fix attempted out of bounds read when deleteing an interface.
https://savannah.nongnu.org/support/index.php?108542
diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c
index ff62bec..fd525ae 100644
--- a/pimd/pim_zebra.c
+++ b/pimd/pim_zebra.c
@@ -113,8 +113,14 @@
/*
zebra api adds/dels interfaces using the same call
interface_add_read below, see comments in lib/zclient.c
+
+ comments in lib/zclient.c seem to indicate that calling
+ zebra_interface_add_read is the correct call, but that
+ results in an attemted out of bounds read which causes
+ pimd to assert. Other clients use zebra_interface_state_read
+ and it appears to work just fine.
*/
- ifp = zebra_interface_add_read(zclient->ibuf);
+ ifp = zebra_interface_state_read(zclient->ibuf);
if (!ifp)
return 0;
@@ -138,7 +144,7 @@
/*
zebra api notifies interface up/down events by using the same call
- interface_add_read below, see comments in lib/zclient.c
+ zebra_interface_state_read below, see comments in lib/zclient.c
*/
ifp = zebra_interface_state_read(zclient->ibuf);
if (!ifp)
@@ -170,7 +176,7 @@
/*
zebra api notifies interface up/down events by using the same call
- interface_add_read below, see comments in lib/zclient.c
+ zebra_interface_state_read below, see comments in lib/zclient.c
*/
ifp = zebra_interface_state_read(zclient->ibuf);
if (!ifp)