failover pair could cause the primary to crash on contact with the
secondary. Thanks to a patch from Steinar Haug.
+- Don't look for IPv6 interfaces on Linux when running in DHCPv4 mode.
+ Thanks to patches from Matthew Newton and David Cantrell.
+
Changes since 4.1.0b1
- A missing "else" in dhcrelay.c could have caused an interface not to
}
#ifdef DHCPv6
- ifaces->fp6 = fopen("/proc/net/if_inet6", "r");
- if (ifaces->fp6 == NULL) {
- log_error("Error opening '/proc/net/if_inet6' to "
- "list IPv6 interfaces; %m");
- close(ifaces->sock);
- ifaces->sock = -1;
- fclose(ifaces->fp);
- ifaces->fp = NULL;
- return 0;
+ if (local_family == AF_INET6) {
+ ifaces->fp6 = fopen("/proc/net/if_inet6", "r");
+ if (ifaces->fp6 == NULL) {
+ log_error("Error opening '/proc/net/if_inet6' to "
+ "list IPv6 interfaces; %m");
+ close(ifaces->sock);
+ ifaces->sock = -1;
+ fclose(ifaces->fp);
+ ifaces->fp = NULL;
+ return 0;
+ }
}
#endif
}
#ifdef DHCPv6
if (!(*err)) {
- return next_iface6(info, err, ifaces);
+ if (local_family == AF_INET6)
+ return next_iface6(info, err, ifaces);
}
#endif
return 0;
close(ifaces->sock);
ifaces->sock = -1;
#ifdef DHCPv6
- fclose(ifaces->fp6);
- ifaces->fp6 = NULL;
+ if (local_family == AF_INET6) {
+ fclose(ifaces->fp6);
+ ifaces->fp6 = NULL;
+ }
#endif
}
#else