]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Linux: mask the NETLINK_GET_STRICT_CHK: Protocol not available error
authorRoy Marples <roy@marples.name>
Fri, 7 Feb 2020 13:21:14 +0000 (13:21 +0000)
committerRoy Marples <roy@marples.name>
Fri, 7 Feb 2020 13:21:14 +0000 (13:21 +0000)
Just to appease Arch LTS users (packages are built with newer
headers than what kernel supports).

src/if-linux.c

index 499ced6c2bae738a7aa7b82398a7b6cbf2ef8f23..40a9f47b378ae46e0cca1b84f5a78eb2052e9de0 100644 (file)
@@ -923,7 +923,7 @@ if_sendnetlink(struct dhcpcd_ctx *ctx, int protocol, struct nlmsghdr *hdr,
                int on = 1;
 
                if (setsockopt(s, SOL_NETLINK, NETLINK_GET_STRICT_CHK,
-                   &on, sizeof(on)) == -1)
+                   &on, sizeof(on)) == -1 && errno != ENOPROTOOPT)
                        logerr("%s: NETLINK_GET_STRICT_CHK", __func__);
        }
 #endif