[Dnsmasq-discuss] NETLINK_NO_ENOBUFS not defined on old platforms

Simon Kelley simon at thekelleys.org.uk
Thu Mar 19 21:35:26 GMT 2020


On 19/03/2020 21:01, Petr Gotthard wrote:
>> Thanks.
>>
>> FWIW in case it gets too silent
>>  resend the patch as `git format-patch` artifact
> 
> Oops, sorry. Let me resend it right away.

No need. I'm working on a slightly more elaborate alternative.


Simon.


> 
> 
>>From f669af70871b80ab7ecf250ea56160a3378f2d94 Mon Sep 17 00:00:00 2001
> From: Petr Gotthard <petr.gotthard at advantech.cz>
> Date: Thu, 19 Mar 2020 21:47:28 +0100
> Subject: [PATCH] Fix build on old platforms without NETLINK_NO_ENOBUFS
> 
> ---
>  src/netlink.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/netlink.c b/src/netlink.c
> index a1ca5d1..0237b9c 100644
> --- a/src/netlink.c
> +++ b/src/netlink.c
> @@ -79,7 +79,9 @@ void netlink_init(void)
>      }
> 
>    if (daemon->netlinkfd == -1 ||
> +#ifdef NETLINK_NO_ENOBUFS
>        setsockopt(daemon->netlinkfd, SOL_NETLINK, NETLINK_NO_ENOBUFS, &opt, sizeof(opt)) == -1 ||
> +#endif
>        getsockname(daemon->netlinkfd, (struct sockaddr *)&addr, &slen) == -1)
>      die(_("cannot create netlink socket: %s"), NULL, EC_MISC);
> 
> --
> 2.17.1
> 
> 
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 




More information about the Dnsmasq-discuss mailing list