summaryrefslogtreecommitdiffstats
path: root/src/if-bsd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2019-10-09 14:20:23 +0100
committerRoy Marples <roy@marples.name>2019-10-09 14:20:23 +0100
commitc9112074952edf1eac4163552a1e7288031926fc (patch)
tree7c9a5c865f27b2246a8e3be6026e3a694136178f /src/if-bsd.c
parent005e6747461a4b279e01500348cdbce82215286c (diff)
downloaddhcpcd-c9112074952edf1eac4163552a1e7288031926fc.tar.xz
BSD: Ignore bridge interfaces
Diffstat (limited to 'src/if-bsd.c')
-rw-r--r--src/if-bsd.c7
1 files changed, 6 insertions, 1 deletions
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 ||