]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
BSD: Ignore bridge interfaces
authorRoy Marples <roy@marples.name>
Wed, 9 Oct 2019 13:20:23 +0000 (14:20 +0100)
committerRoy Marples <roy@marples.name>
Wed, 9 Oct 2019 13:20:23 +0000 (14:20 +0100)
src/if-bsd.c

index 2a733515d9a9f95a793b1cb9a5d2b14149be8aad..a2c613edcb307a33ab315003e7018d7b94ff8546 100644 (file)
 
 /* Ignore these interface names which look like ethernet but are virtual. */
 static const char * const ifnames_ignore[] = {
-       "tap",
+       "bridge",
        "fwe",          /* Firewire */
+       "tap",
        NULL
 };
 
@@ -243,6 +244,10 @@ if_ignore(struct dhcpcd_ctx *ctx, const char *ifname)
        struct ifg_req *ifg;
        size_t ifg_len;
 
+       /* Sadly it is possible to remove the device name
+        * from the interface groups, but hopefully this
+        * will be very unlikely.... */
+
        strlcpy(ifgr.ifgr_name, ifname, sizeof(ifgr.ifgr_name));
        if (ioctl(ctx->pf_inet_fd, SIOCGIFGROUP, &ifgr) == -1 ||
            (ifgr.ifgr_groups = malloc(ifgr.ifgr_len)) == NULL ||