Author: qingli
Date: Sat Aug 15 16:48:58 2020
New Revision: 364257
URL: https://svnweb.freebsd.org/changeset/base/364257

Log:
  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

Modified:
  head/sys/net/if_vxlan.c

Modified: head/sys/net/if_vxlan.c
==============================================================================
--- head/sys/net/if_vxlan.c     Sat Aug 15 16:15:34 2020        (r364256)
+++ head/sys/net/if_vxlan.c     Sat Aug 15 16:48:58 2020        (r364257)
@@ -2545,7 +2545,7 @@ vxlan_rcv_udp_packet(struct mbuf *m, int offset, struc
         * 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;
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to