Bad nexthop messages from netlink were causing zebra
to hang here. Added a check to verify the length
of the nexthop so it doesn't keep trying to read.
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
route_entry_nexthop_ifindex_add(
re, index, nh_vrf_id);
+ if (rtnh->rtnh_len == 0)
+ break;
+
len -= NLMSG_ALIGN(rtnh->rtnh_len);
rtnh = RTNH_NEXT(rtnh);
}
oif[oif_count] = rtnh->rtnh_ifindex;
oif_count++;
+ if (rtnh->rtnh_len == 0)
+ break;
+
len -= NLMSG_ALIGN(rtnh->rtnh_len);
rtnh = RTNH_NEXT(rtnh);
}