    Fix vlan creation for the older ifconfig(8) binaries.
    
    Reported by:    allanjude
    MFC after:      immediately
    
    (cherry picked from commit afbb64f1d85b7d8c2938031c3567946b5d10da4f)
--- sys/net/if_vlan.c.orig
+++ sys/net/if_vlan.c
@@ -1012,6 +1012,10 @@
 		vid = vlr.vlr_tag;
 		proto = vlr.vlr_proto;
 
+#ifdef COMPAT_FREEBSD12
+		if (proto == 0)
+			proto = ETHERTYPE_VLAN;
+#endif
 		p = ifunit_ref(vlr.vlr_parent);
 		if (p == NULL)
 			return (ENXIO);
@@ -1942,6 +1946,10 @@
 			error = ENOENT;
 			break;
 		}
+#ifdef COMPAT_FREEBSD12
+		if (vlr.vlr_proto == 0)
+			vlr.vlr_proto = ETHERTYPE_VLAN;
+#endif
 		oldmtu = ifp->if_mtu;
 		error = vlan_config(ifv, p, vlr.vlr_tag, vlr.vlr_proto);
 		if_rele(p);
