changeset 2994:19fabfe71766 draft

Add support for IFT_PPP and IFT_PROPVIRTUAL. Thanks to Guy Yur.
author Roy Marples <roy@marples.name>
date Thu, 05 Mar 2015 19:43:46 +0000
parents 3667db0785f9
children 71bf6d24a608
files if.c
diffstat 1 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/if.c	Thu Mar 05 19:34:00 2015 +0000
+++ b/if.c	Thu Mar 05 19:43:46 2015 +0000
@@ -331,8 +331,16 @@
 			ifp->index = sdl->sdl_index;
 			switch(sdl->sdl_type) {
 #ifdef IFT_BRIDGE
-			case IFT_BRIDGE:
-				/* Don't allow bridge unless explicit */
+			case IFT_BRIDGE: /* FALLTHROUGH */
+#endif
+#ifdef IFT_PPP
+			case IFT_PPP: /* FALLTHROUGH */
+#endif
+#ifdef IFT_PROPVIRTUAL
+			case IFT_PROPVIRTUAL: /* FALLTHROUGH */
+#endif
+#if defined(IFT_BRIDGE) || defined(IFT_PPP) || defined(IFT_PROPVIRTUAL)
+				/* Don't allow unless explicit */
 				if ((argc == 0 || argc == -1) &&
 				    ctx->ifac == 0 &&
 				    !if_hasconf(ctx, ifp->name))
@@ -340,10 +348,10 @@
 					if_free(ifp);
 					continue;
 				}
-				/* FALLTHOUGH */
+				/* FALLTHROUGH */
 #endif
 #ifdef IFT_L2VLAN
-			case IFT_L2VLAN: /* FALLTHOUGH */
+			case IFT_L2VLAN: /* FALLTHROUGH */
 #endif
 #ifdef IFT_L3IPVLAN
 			case IFT_L3IPVLAN: /* FALLTHROUGH */