diff options
author | wpaul <wpaul@FreeBSD.org> | 2001-07-31 16:38:58 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 2001-07-31 16:38:58 +0000 |
commit | fdddc3e2c4dd84957188506ec1e72bdd10ad4a3f (patch) | |
tree | de40ee90583b3bdadf1bbc46942e14ddbd3cb0d9 /sys | |
parent | 815111597373d30225ba41fa23b22acbaa0a3403 (diff) | |
download | FreeBSD-src-fdddc3e2c4dd84957188506ec1e72bdd10ad4a3f.zip FreeBSD-src-fdddc3e2c4dd84957188506ec1e72bdd10ad4a3f.tar.gz |
Re-order things slightly in the RX handler for VLAN support: we need
call vlan_input_tag() after stripping the ether header from the frame
with m_adj(), not before.
Noticed by: Brooks Davis <brooks@one-eyed-alien.net>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/txp/if_txp.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/txp/if_txp.c b/sys/dev/txp/if_txp.c index 76625e7..f5e72b1 100644 --- a/sys/dev/txp/if_txp.c +++ b/sys/dev/txp/if_txp.c @@ -805,6 +805,10 @@ txp_rx_reclaim(sc, r) m->m_pkthdr.csum_data = 0xffff; } + eh = mtod(m, struct ether_header *); + /* Remove header from mbuf and pass it on. */ + m_adj(m, sizeof(struct ether_header)); + #if NVLAN > 0 if (rxd->rx_stat & RX_STAT_VLAN) { if (vlan_input_tag(eh, m, @@ -813,11 +817,6 @@ txp_rx_reclaim(sc, r) goto next; } #endif - - eh = mtod(m, struct ether_header *); - /* Remove header from mbuf and pass it on. */ - m_adj(m, sizeof(struct ether_header)); - ether_input(ifp, eh, m); next: |