]> 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:16:06 +0000 (13:16 +0000)
committerRoy Marples <roy@marples.name>
Fri, 7 Feb 2020 13:16:06 +0000 (13:16 +0000)
Just to appease Arch LTS users (packages are built with newer
headers than what kernel supports).

src/if-linux.c

index 8ac7db753670678dd4987dda909f5b6758d7b829..8f939761b0df23de210e74459c268dc16326ef75 100644 (file)
@@ -1016,7 +1016,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