When the user does not specify an interface for a VIP, a default
interface is used. This default interface is fixed to "eth0" which may
not exist on a system (for example, it may have been renamed). We
display a warning instead of just segfaulting in this case.
new->ifindex = IF_INDEX(ifp);
} else {
new->ifp = if_get_by_ifname(DFLT_INT);
+ if (!new->ifp) {
+ log_message(LOG_INFO, "Default interface " DFLT_INT
+ " does not exist and no interface specified. "
+ "Skip VRRP address.");
+ FREE(new);
+ return;
+ }
new->ifindex = IF_INDEX(new->ifp);
}