mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-11-27 20:58:36 +00:00
Convert failure of setsockopt(..., SOL_NETLINK, NETLINK_NO_ENOBUFS, ...) into warning.
We call this, which avoids POLLERR returns from netlink on a loaded system, if the kernel is new enough to support it. Sadly, qemu-user doesn't support the socket option, so if it fails despite the kernel being new enough to support it, we just emit a warning, rather than failing hard.
This commit is contained in:
3 files changed
+14
-5
No files matched your search
+5
-1
@@ -58,6 +58,7 @@ int main (int argc, char **argv)
|
||||
char *bound_device = NULL;
|
||||
int did_bind = 0;
|
||||
struct server *serv;
|
||||
char *netlink_warn;
|
||||
#endif
|
||||
#if defined(HAVE_DHCP) || defined(HAVE_DHCP6)
|
||||
struct dhcp_context *context;
|
||||
@@ -327,7 +328,7 @@ int main (int argc, char **argv)
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_LINUX_NETWORK)
|
||||
netlink_init();
|
||||
netlink_warn = netlink_init();
|
||||
#elif defined(HAVE_BSD_NETWORK)
|
||||
route_init();
|
||||
#endif
|
||||
@@ -946,6 +947,9 @@ int main (int argc, char **argv)
|
||||
# ifdef HAVE_LINUX_NETWORK
|
||||
if (did_bind)
|
||||
my_syslog(MS_DHCP | LOG_INFO, _("DHCP, sockets bound exclusively to interface %s"), bound_device);
|
||||
|
||||
if (netlink_warn)
|
||||
my_syslog(LOG_WARNING, netlink_warn);
|
||||
# endif
|
||||
|
||||
/* after dhcp_construct_contexts */
|
||||
|
||||
Reference in new issue
Block a user