diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -446,9 +446,11 @@ struct ether_header *eh; eh = mtod(*mp, struct ether_header *); - if (ntohs(eh->ether_type) == ETHERTYPE_VLAN || - ntohs(eh->ether_type) == ETHERTYPE_QINQ) + if (eh->ether_type == htons(ETHERTYPE_VLAN) || + eh->ether_type == htons(ETHERTYPE_QINQ)) { + (*mp)->m_flags &= ~M_VLANTAG; return (true); + } qtag.vid = 0; qtag.pcp = pcp; @@ -1463,6 +1465,7 @@ if_printf(ife, "unable to prepend 802.1Q header"); return (false); } + (*mp)->m_flags &= ~M_VLANTAG; } return (true); }