[Dnsmasq-discuss] NETLINK_NO_ENOBUFS not defined on old platforms

Roy Marples roy at marples.name
Fri Mar 20 02:18:18 GMT 2020


On 19/03/2020 22:01, Simon Kelley wrote:
> http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=0506a5ed4e56863627c54aedad30ad61221292ef
> 
> 
> should handle both old kernel header files and old kernels, in any
> combination.

I really dislike this approach because it makes the assumption that no other 
symbol will take No 5.

Whilst this might be true for generic linux, is it true for customised linux?
Or to put it another way I can point to many examples cross BSD where the ioctls 
differ in number but not name.

You might take the view "So what? We just support generic linux.".

I have started to take the hard stance with Arch Linux which shipped latest 
kernel headers and support that on an old LTS kernel. It's not maintainable 
because I've had 3 instances where dhcpcd used to do this and then promptly 
crashed on newer kernels because they had customised headers.

Modern software should not need this hack. Either #ifdef around it or require 
userland headers to define it. Don't hardcode it as it's not userlands 
responsibility to do it.

See the similar case where OpenBSD removed a ioctl but let it in the header - 
even worse!!

Roy



More information about the Dnsmasq-discuss mailing list