diff options
author | ae <ae@FreeBSD.org> | 2017-04-18 09:17:20 +0000 |
---|---|---|
committer | ae <ae@FreeBSD.org> | 2017-04-18 09:17:20 +0000 |
commit | 3a2a61ad59272c1bd59b2cb90870ab59d1d493c5 (patch) | |
tree | 8bffb73c7a1f130272708be29c66f724e03d1473 /sys/net/if_vlan.c | |
parent | 59a524a9111affef7c7c2ce1141781301f3ebca8 (diff) | |
download | FreeBSD-src-3a2a61ad59272c1bd59b2cb90870ab59d1d493c5.zip FreeBSD-src-3a2a61ad59272c1bd59b2cb90870ab59d1d493c5.tar.gz |
MFC r316716:
Inherit IPv6 checksum offloading flags to vlan interfaces.
if_vlan(4) interfaces inherit IPv4 checksum offloading flags from the
parent when VLAN_HWCSUM and VLAN_HWTAGGING flags are present on the
parent interface. Do the same for IPv6 checksum offloading flags.
Reported by: Harry Schmalzbauer
Reviewed by: np, gnn
Differential Revision: https://reviews.freebsd.org/D10356
Diffstat (limited to 'sys/net/if_vlan.c')
-rw-r--r-- | sys/net/if_vlan.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 73470dc..223b823 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -1547,13 +1547,16 @@ vlan_capabilities(struct ifvlan *ifv) * offloading requires hardware VLAN tagging. */ if (p->if_capabilities & IFCAP_VLAN_HWCSUM) - ifp->if_capabilities = p->if_capabilities & IFCAP_HWCSUM; + ifp->if_capabilities = + p->if_capabilities & (IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6); if (p->if_capenable & IFCAP_VLAN_HWCSUM && p->if_capenable & IFCAP_VLAN_HWTAGGING) { - ifp->if_capenable = p->if_capenable & IFCAP_HWCSUM; + ifp->if_capenable = + p->if_capenable & (IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6); ifp->if_hwassist = p->if_hwassist & (CSUM_IP | CSUM_TCP | - CSUM_UDP | CSUM_SCTP); + CSUM_UDP | CSUM_SCTP | CSUM_TCP_IPV6 | CSUM_UDP_IPV6 | + CSUM_SCTP_IPV6); } else { ifp->if_capenable = 0; ifp->if_hwassist = 0; |