Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
/* OSPF errors init */
ospf_error_init();
+ /*
+ * Need to initialize the default ospf structure, so the interface mode
+ * commands can be duly processed if they are received before 'router
+ * ospf', when ospfd is restarted
+ */
+ bool created = false;
+ if (instance && !ospf_get_instance(instance, &created)) {
+ flog_err(EC_OSPF_INIT_FAIL, "OSPF instance init failed: %s",
+ strerror(errno));
+ exit(1);
+ }
+
frr_config_fork();
frr_run(master);
frr_with_privs(&pimd_privs) {
+#ifndef FUZZING
fd = socket(AF_INET, SOCK_RAW, IPPROTO_IGMP);
if (fd < 0) {
safe_strerror(errno));
return -2;
}
+#else
+ fd = 69;
+#endif
#ifdef SO_BINDTODEVICE
if (pim->vrf->vrf_id != VRF_DEFAULT
}
pim->mroute_socket = fd;
+#ifndef FUZZING
if (pim_mroute_set(pim, 1)) {
zlog_warn(
"Could not enable mroute on socket fd=%d: errno=%d: %s",
pim->mroute_socket_creation = pim_time_monotonic_sec();
mroute_read_on(pim);
+#endif
return 0;
}