Handle old kernels that don't do NETLINK_NO_ENOBUFS.

Deal with both old kernel header files that don't define it,
and old kernels that don't implement it.

Also generalise Linux kernel version handling.
This commit is contained in:
Simon Kelley
2020-03-19 21:56:45 +00:00
parent e7ee1aa093
commit 0506a5ed4e
5 changed files with 40 additions and 20 deletions

View File

@@ -89,11 +89,15 @@ int main (int argc, char **argv)
sigaction(SIGPIPE, &sigact, NULL);
umask(022); /* known umask, create leases and pid files as 0644 */
rand_init(); /* Must precede read_opts() */
read_opts(argc, argv, compile_opts);
#ifdef HAVE_LINUX_NETWORK
daemon->kernel_version = kernel_version();
#endif
if (daemon->edns_pktsz < PACKETSZ)
daemon->edns_pktsz = PACKETSZ;