mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Fix VLAN hardware tag insertion/stripping on big-endian
architectures. Reported by: naddy Tested on: sparc64 MFC after: 1 week
This commit is contained in:
parent
2bd5f41aae
commit
bddff93469
1 changed files with 2 additions and 2 deletions
|
|
@ -1903,7 +1903,7 @@ re_rxeof(struct rl_softc *sc)
|
|||
maxpkt--;
|
||||
if (rxvlan & RL_RDESC_VLANCTL_TAG) {
|
||||
m->m_pkthdr.ether_vtag =
|
||||
ntohs((rxvlan & RL_RDESC_VLANCTL_DATA));
|
||||
bswap16((rxvlan & RL_RDESC_VLANCTL_DATA));
|
||||
m->m_flags |= M_VLANTAG;
|
||||
}
|
||||
RL_UNLOCK(sc);
|
||||
|
|
@ -2307,7 +2307,7 @@ re_encap(struct rl_softc *sc, struct mbuf **m_head)
|
|||
* transmission attempt.
|
||||
*/
|
||||
if ((*m_head)->m_flags & M_VLANTAG)
|
||||
vlanctl |= htons((*m_head)->m_pkthdr.ether_vtag) |
|
||||
vlanctl |= bswap16((*m_head)->m_pkthdr.ether_vtag) |
|
||||
RL_TDESC_VLANCTL_TAG;
|
||||
|
||||
si = prod;
|
||||
|
|
|
|||
Loading…
Reference in a new issue