summaryrefslogtreecommitdiffstats
path: root/if.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2014-10-08 11:51:34 +0000
committerRoy Marples <roy@marples.name>2014-10-08 11:51:34 +0000
commit2321ae6f914fee4012fb978d47a1307d3ffeff33 (patch)
treef5eeaa74d368cee84ad29fc6bf80c013128a6b61 /if.c
parentfb30935e5be3cac6350e7e5cb05465513813486f (diff)
downloaddhcpcd-2321ae6f914fee4012fb978d47a1307d3ffeff33.tar.xz
Don't work on bridge interfaces unless explicitly asked to.
Diffstat (limited to 'if.c')
-rw-r--r--if.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/if.c b/if.c
index 70b6de8f..fe099aa6 100644
--- a/if.c
+++ b/if.c
@@ -330,7 +330,13 @@ if_discover(struct dhcpcd_ctx *ctx, int argc, char * const *argv)
sdl_type = sdl->sdl_type;
switch(sdl->sdl_type) {
#ifdef IFT_BRIDGE
- case IFT_BRIDGE: /* FALLTHROUGH */
+ case IFT_BRIDGE:
+ /* Don't allow bridge unless explicit */
+ if (argc == 0 && ctx->ifac == 0) {
+ if_free(ifp);
+ continue;
+ }
+ /* FALLTHOUGH */
#endif
#ifdef IFT_L2VLAN
case IFT_L2VLAN: /* FALLTHOUGH */