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>
This commit is contained in:
Bill Paul 2001-07-31 16:38:58 +00:00
parent 545d32087b
commit 89b1abc0bf

View File

@ -805,6 +805,10 @@ txp_rx_reclaim(sc, r)
m->m_pkthdr.csum_data = 0xffff; 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 NVLAN > 0
if (rxd->rx_stat & RX_STAT_VLAN) { if (rxd->rx_stat & RX_STAT_VLAN) {
if (vlan_input_tag(eh, m, if (vlan_input_tag(eh, m,
@ -813,11 +817,6 @@ txp_rx_reclaim(sc, r)
goto next; goto next;
} }
#endif #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); ether_input(ifp, eh, m);
next: next: