Correct the mask byte order when checking for reserved bits.

Reviewed by:	gnn
Approved by:	gnn
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D26071
This commit is contained in:
Qing Li 2020-08-15 16:48:58 +00:00
parent 9ead45af7b
commit a5154bb2e5

View File

@ -2545,7 +2545,7 @@ vxlan_rcv_udp_packet(struct mbuf *m, int offset, struct inpcb *inpcb,
* the behavior of the Linux implementation.
*/
if (vxh->vxlh_flags != htonl(VXLAN_HDR_FLAGS_VALID_VNI) ||
vxh->vxlh_vni & ~htonl(VXLAN_VNI_MASK))
vxh->vxlh_vni & ~VXLAN_VNI_MASK)
goto out;
vni = ntohl(vxh->vxlh_vni) >> VXLAN_HDR_VNI_SHIFT;