summaryrefslogtreecommitdiffstats
path: root/sys/net/if_ethersubr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/if_ethersubr.c')
-rw-r--r--sys/net/if_ethersubr.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 5b646b8..3a943bf 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -101,11 +101,6 @@ extern u_char aarp_org_code[3];
#include <net/bridge.h>
#endif
-#include "vlan.h"
-#if NVLAN > 0
-#include <net/if_vlan_var.h>
-#endif /* NVLAN > 0 */
-
/* netgraph node hooks for ng_ether(4) */
void (*ng_ether_input_p)(struct ifnet *ifp,
struct mbuf **mp, struct ether_header *eh);
@@ -115,6 +110,10 @@ int (*ng_ether_output_p)(struct ifnet *ifp, struct mbuf **mp);
void (*ng_ether_attach_p)(struct ifnet *ifp);
void (*ng_ether_detach_p)(struct ifnet *ifp);
+int (*vlan_input_p)(struct ether_header *eh, struct mbuf *m);
+int (*vlan_input_tag_p)(struct ether_header *eh, struct mbuf *m,
+ u_int16_t t);
+
static int ether_resolvemulti __P((struct ifnet *, struct sockaddr **,
struct sockaddr *));
u_char etherbroadcastaddr[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
@@ -524,14 +523,6 @@ ether_demux(ifp, eh, m)
ether_type = ntohs(eh->ether_type);
-#if NVLAN > 0
- if (ether_type == vlan_proto) {
- if (vlan_input(eh, m) < 0)
- ifp->if_data.ifi_noproto++;
- return;
- }
-#endif /* NVLAN > 0 */
-
switch (ether_type) {
#ifdef INET
case ETHERTYPE_IP:
@@ -582,6 +573,9 @@ ether_demux(ifp, eh, m)
aarpinput(IFP2AC(ifp), m); /* XXX */
return;
#endif NETATALK
+ case ETHERTYPE_VLAN:
+ VLAN_INPUT(ifp, eh, m);
+ return;
default:
#ifdef IPX
if (ef_inputp && ef_inputp(ifp, eh, m) == 0)
OpenPOWER on IntegriCloud