diff options
author | ru <ru@FreeBSD.org> | 2003-11-12 12:58:19 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2003-11-12 12:58:19 +0000 |
commit | be4f5f73c6576bbb905784b339eef001faaf8168 (patch) | |
tree | bfef45297b7443f13cb583fdde6d087cbee601a6 /sys | |
parent | 22656dea023335782398e35748bff034f2541e90 (diff) | |
download | FreeBSD-src-be4f5f73c6576bbb905784b339eef001faaf8168.zip FreeBSD-src-be4f5f73c6576bbb905784b339eef001faaf8168.tar.gz |
- vlan_start(): Increment the correct interface statistics member.
Reviewed by: mdodd
- vlan_input(): Macroize the VLAN tag extraction from mbuf.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/if_vlan.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 75f25ed..315412f 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -346,7 +346,7 @@ vlan_start(struct ifnet *ifp) M_PREPEND(m, ifv->ifv_encaplen, M_DONTWAIT); if (m == NULL) { if_printf(ifp, "unable to prepend VLAN header"); - ifp->if_ierrors++; + ifp->if_oerrors++; continue; } /* M_PREPEND takes care of m_len, m_pkthdr.len for us */ @@ -356,7 +356,7 @@ vlan_start(struct ifnet *ifp) if (m == NULL) { if_printf(ifp, "cannot pullup VLAN header"); - ifp->if_ierrors++; + ifp->if_oerrors++; continue; } } @@ -405,7 +405,7 @@ vlan_input(struct ifnet *ifp, struct mbuf *m) * Packet is tagged, m contains a normal * Ethernet frame; the tag is stored out-of-band. */ - tag = EVL_VLANOFTAG(*(u_int*)(mtag+1)); + tag = EVL_VLANOFTAG(VLAN_TAG_VALUE(mtag)); m_tag_delete(m, mtag); } else { switch (ifp->if_type) { |