If Zebra sends us an interface add notification with a garbage VRF we
crash on an assert(vrf_get(vrf_id, NULL)); let's not
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
STREAM_GET(ifname_tmp, s, INTERFACE_NAMSIZ);
/* Lookup/create interface by name. */
+ if (!vrf_get(vrf_id, NULL)) {
+ zlog_debug(
+ "Rx'd interface add from Zebra, but VRF %u does not exist",
+ vrf_id);
+ return -1;
+ }
+
ifp = if_get_by_name(ifname_tmp, vrf_id);
zebra_interface_if_set_value(s, ifp);