diff options
| author | Roy Marples <roy@marples.name> | 2019-10-09 14:20:23 +0100 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2019-10-09 14:20:23 +0100 |
| commit | c9112074952edf1eac4163552a1e7288031926fc (patch) | |
| tree | 7c9a5c865f27b2246a8e3be6026e3a694136178f /src/if-bsd.c | |
| parent | 005e6747461a4b279e01500348cdbce82215286c (diff) | |
| download | dhcpcd-c9112074952edf1eac4163552a1e7288031926fc.tar.xz | |
BSD: Ignore bridge interfaces
Diffstat (limited to 'src/if-bsd.c')
| -rw-r--r-- | src/if-bsd.c | 7 |
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 || |
