Lines 81-86
Link Here
|
81 |
|
81 |
|
82 |
#include <netinet/ip_encap.h> |
82 |
#include <netinet/ip_encap.h> |
83 |
#include <net/ethernet.h> |
83 |
#include <net/ethernet.h> |
|
|
84 |
#include <net/if_vlan_var.h> |
84 |
#include <net/if_bridgevar.h> |
85 |
#include <net/if_bridgevar.h> |
85 |
#include <net/if_gif.h> |
86 |
#include <net/if_gif.h> |
86 |
|
87 |
|
Lines 560-565
Link Here
|
560 |
m->m_flags |= M_MCAST; |
561 |
m->m_flags |= M_MCAST; |
561 |
ifp->if_imcasts++; |
562 |
ifp->if_imcasts++; |
562 |
} |
563 |
} |
|
|
564 |
/* Check vlan tagging on received frame. */ |
565 |
/* Probably should be moved somewhere up. */ |
566 |
if (ntohs(eh->ether_type) == ETHERTYPE_VLAN) { |
567 |
/* Copy from if_ethersubr.c */ |
568 |
struct ether_vlan_header *evl; |
569 |
if (m->m_len < sizeof(*evl) && |
570 |
(m = m_pullup(m, sizeof(*evl))) == NULL) { |
571 |
#ifdef DIAGNOSTIC |
572 |
if_printf(ifp, "cannot pullup VLAN header\n"); |
573 |
#endif |
574 |
ifp->if_ierrors++; |
575 |
m_freem(m); |
576 |
return; |
577 |
} |
578 |
|
579 |
evl = mtod(m, struct ether_vlan_header *); |
580 |
m->m_pkthdr.ether_vtag = ntohs(evl->evl_tag); |
581 |
m->m_flags |= M_VLANTAG; |
582 |
|
583 |
bcopy((char *)evl, (char *)evl + ETHER_VLAN_ENCAP_LEN, |
584 |
ETHER_HDR_LEN - ETHER_TYPE_LEN); |
585 |
m_adj(m, ETHER_VLAN_ENCAP_LEN); |
586 |
/* End of copy */ |
587 |
} |
588 |
|
563 |
BRIDGE_INPUT(ifp, m); |
589 |
BRIDGE_INPUT(ifp, m); |
564 |
|
590 |
|
565 |
if (m != NULL && ifp != oldifp) { |
591 |
if (m != NULL && ifp != oldifp) { |