]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Linux: File compile without plugins
authorJulian Wollrath <julian@haerkules.de>
Sat, 30 May 2020 14:21:04 +0000 (14:21 +0000)
committerRoy Marples <roy@marples.name>
Sat, 30 May 2020 14:21:04 +0000 (14:21 +0000)
src/if-linux.c

index 9e87cef4b647bdd2ffb0bb94601d4e51b3cc7327..7c8d7e2bd4a5b4f8f03bc8c5dff5712d617a8bea 100644 (file)
@@ -891,9 +891,11 @@ link_netlink(struct dhcpcd_ctx *ctx, void *arg, struct nlmsghdr *nlm)
        }
 
        if (nlm->nlmsg_type == RTM_DELLINK) {
+#ifdef PLUGIN_DEV
                /* If are listening to a dev manager, let that remove
                 * the interface rather than the kernel. */
                if (dev_listening(ctx) < 1)
+#endif
                        dhcpcd_handleinterface(ctx, -1, ifn);
                return 0;
        }
@@ -910,9 +912,11 @@ link_netlink(struct dhcpcd_ctx *ctx, void *arg, struct nlmsghdr *nlm)
        /* Check for a new interface */
        ifp = if_findindex(ctx->ifaces, (unsigned int)ifi->ifi_index);
        if (ifp == NULL) {
+#ifdef PLUGIN_DEV
                /* If are listening to a dev manager, let that announce
                 * the interface rather than the kernel. */
                if (dev_listening(ctx) < 1)
+#endif
                        dhcpcd_handleinterface(ctx, 1, ifn);
                return 0;
        }