]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Don't work on bridge interfaces unless explicitly asked to.
authorRoy Marples <roy@marples.name>
Wed, 8 Oct 2014 11:51:34 +0000 (11:51 +0000)
committerRoy Marples <roy@marples.name>
Wed, 8 Oct 2014 11:51:34 +0000 (11:51 +0000)
if.c

diff --git a/if.c b/if.c
index 70b6de8f646c6d9d32bd5fec0b2b076112e7ce1c..fe099aa6b70d5d15f225fbb39e4489c6f963a8bc 100644 (file)
--- 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 */