On Sun, Apr 19, 2020 at 07:19:10AM +0200, Dominik wrote: > On Wed, 2020-04-15 at 21:34 +0200, Dominik wrote: > > A possible solution seems to be what Petr Gotthard suggested > > (dnsmasq-discuss /Thu Mar 19 13:16:11 GMT 2020/): > > > > > +#ifdef NETLINK_NO_ENOBUFS > > > setsockopt(daemon->netlinkfd, SOL_NETLINK, > > > NETLINK_NO_ENOBUFS, &opt, sizeof(opt)) == -1 || > > > +#endif > > Patch attached which restored dnsmasq operation for us. > > Have a nice weekend!
;-) > Best regards, > Dominik > From 59e38c1e81e3ec479866a47cadb92d53b9f86022 Mon Sep 17 00:00:00 2001 > From: Dominik Derigs <dl...@dl6er.de> > Date: Sun, 19 Apr 2020 07:15:00 +0200 > Subject: [PATCH] Don't try setsockopt of non-existing NETLINK_NO_ENOBUFS > option to prevent dnsmasq from failing in docker qemu emulation. FWIW git commit summary is supposed to be less then 53 characters > --- > src/netlink.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/src/netlink.c b/src/netlink.c > index 3af54c4..21e84ef 100644 > --- a/src/netlink.c > +++ b/src/netlink.c > @@ -27,10 +27,6 @@ > #define SOL_NETLINK 270 > #endif > > -#ifndef NETLINK_NO_ENOBUFS Tests on "not defined" > -#define NETLINK_NO_ENOBUFS 5 Pushes (very (rude)) the value to 5 > -#endif > - > /* linux 2.6.19 buggers up the headers, patch it up here. */ > #ifndef IFA_RTA > # define IFA_RTA(r) \ > @@ -83,7 +79,9 @@ void netlink_init(void) > > if (daemon->netlinkfd == -1 || > (daemon->kernel_version >= KERNEL_VERSION(2,6,30) && > +#ifdef NETLINK_NO_ENOBUFS in case it is defined > setsockopt(daemon->netlinkfd, SOL_NETLINK, NETLINK_NO_ENOBUFS, &opt, > sizeof(opt)) == -1) || use it with value as set in proper place > +#endif > getsockname(daemon->netlinkfd, (struct sockaddr *)&addr, &slen) == -1) > die(_("cannot create netlink socket: %s"), NULL, EC_MISC); > My apologies for not tested on "Yes, with that patch it still works for me" Groeten Geert Stappers -- Silence is hard to parse _______________________________________________ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss