From: Roy Marples Date: Wed, 9 Oct 2019 13:20:23 +0000 (+0100) Subject: BSD: Ignore bridge interfaces X-Git-Tag: v8.1.0~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49cc1aa4e255dbf3ac7ee2317f4bef0c12a2f3dd;p=thirdparty%2Fdhcpcd.git BSD: Ignore bridge interfaces --- diff --git a/src/if-bsd.c b/src/if-bsd.c index 2a733515..a2c613ed 100644 --- a/src/if-bsd.c +++ b/src/if-bsd.c @@ -103,8 +103,9 @@ /* 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 ||