aboutsummaryrefslogtreecommitdiff
path: root/sys/net/if_vxlan.c
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2020-12-21 16:59:26 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2020-12-23 08:54:06 +0000
commit994e47023ac87ede16e9c785ac5d6880e3d3a23c (patch)
tree3a12de91bf3bae087b16cf56ea023862f5da56a9 /sys/net/if_vxlan.c
parent2ac1c1927258e649e3ca3269aea40fb4c63e2296 (diff)
downloadsrc-994e47023ac87ede16e9c785ac5d6880e3d3a23c.tar.gz
src-994e47023ac87ede16e9c785ac5d6880e3d3a23c.zip
vxlan: stop checking CSUM_ENCAP_VXLAN when converting inner CSUM flags into normal, for decapsulation.
The packet, if processed at this point, was already parsed to be UDP directed to a vxlan port. Connect-X 4+ does not provide easy method to infer which parser processed the packet, so driver cannot set the flag without a lot of efforts which are only to satisfy the formal requirements. Reviewed by: bryanv, np Sponsored by: Mellanox Technologies/NVidia Networking Differential revision: https://reviews.freebsd.org/D27449 MFC after: 1 week
Diffstat (limited to 'sys/net/if_vxlan.c')
-rw-r--r--sys/net/if_vxlan.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c
index 9f6541f9db43..d0d335dba9ed 100644
--- a/sys/net/if_vxlan.c
+++ b/sys/net/if_vxlan.c
@@ -2824,8 +2824,7 @@ vxlan_input(struct vxlan_socket *vso, uint32_t vni, struct mbuf **m0,
m_clrprotoflags(m);
m->m_pkthdr.rcvif = ifp;
M_SETFIB(m, ifp->if_fib);
- if (m->m_pkthdr.csum_flags & CSUM_ENCAP_VXLAN &&
- ((ifp->if_capenable & IFCAP_RXCSUM &&
+ if (((ifp->if_capenable & IFCAP_RXCSUM &&
m->m_pkthdr.csum_flags & CSUM_INNER_L3_CALC) ||
(ifp->if_capenable & IFCAP_RXCSUM_IPV6 &&
!(m->m_pkthdr.csum_flags & CSUM_INNER_L3_CALC)))) {