]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
BSD: Add IFT_TUNNEL
authorRoy Marples <roy@marples.name>
Thu, 10 Oct 2019 10:54:47 +0000 (10:54 +0000)
committerRoy Marples <roy@marples.name>
Thu, 10 Oct 2019 10:54:47 +0000 (10:54 +0000)
Requires explicit support but shouldn't log a code.

src/if.c

index c6e1d1902c256d19090be8fc20a19dcef4d52b18..ff0e4c4d46fb80122e84f39cee6fa08a94317fd8 100644 (file)
--- a/src/if.c
+++ b/src/if.c
@@ -457,13 +457,13 @@ if_discover(struct dhcpcd_ctx *ctx, struct ifaddrs **ifaddrs,
 #ifdef IFT_BRIDGE
                        case IFT_BRIDGE: /* FALLTHROUGH */
 #endif
-#ifdef IFT_PPP
-                       case IFT_PPP: /* FALLTHROUGH */
-#endif
 #ifdef IFT_PROPVIRTUAL
-                       case IFT_PROPVIRTUAL:
+                       case IFT_PROPVIRTUAL: /* FALLTHROUGH */
+#endif
+#ifdef IFT_TUNNEL
+                       case IFT_TUNNEL: /* FALLTHROUGH */
 #endif
-#if defined(IFT_BRIDGE) || defined(IFT_PPP) || defined(IFT_PROPVIRTUAL)
+                       case IFT_PPP:
                                /* Don't allow unless explicit */
                                if ((argc == 0 || argc == -1) &&
                                    ctx->ifac == 0 && active &&
@@ -475,15 +475,14 @@ if_discover(struct dhcpcd_ctx *ctx, struct ifaddrs **ifaddrs,
                                            ifp->name);
                                        active = IF_INACTIVE;
                                }
-                               __fallthrough; /* Appease gcc-7 */
                                /* FALLTHROUGH */
-#endif
 #ifdef IFT_L2VLAN
                        case IFT_L2VLAN: /* FALLTHROUGH */
 #endif
 #ifdef IFT_L3IPVLAN
                        case IFT_L3IPVLAN: /* FALLTHROUGH */
 #endif
+                               /* FALLTHROUGH */
                        case IFT_ETHER:
                                ifp->family = ARPHRD_ETHER;
                                break;