mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
Suport Q-in-Q for mvneta.
This commit is contained in:
parent
a5c2d59ed3
commit
ea68079ffd
1 changed files with 4 additions and 0 deletions
|
|
@ -2792,6 +2792,7 @@ mvneta_tx_set_csumflag(struct ifnet *ifp,
|
|||
struct mvneta_tx_desc *t, struct mbuf *m)
|
||||
{
|
||||
struct ether_header *eh;
|
||||
struct ether_vlan_header *evh;
|
||||
int csum_flags;
|
||||
uint32_t iphl, ipoff;
|
||||
struct ip *ip;
|
||||
|
|
@ -2806,6 +2807,9 @@ mvneta_tx_set_csumflag(struct ifnet *ifp,
|
|||
break;
|
||||
case ETHERTYPE_VLAN:
|
||||
ipoff = ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN;
|
||||
evh = mtod(m, struct ether_vlan_header *);
|
||||
if (ntohs(evh->evl_proto) == ETHERTYPE_VLAN)
|
||||
ipoff += ETHER_VLAN_ENCAP_LEN;
|
||||
break;
|
||||
default:
|
||||
csum_flags = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue