summaryrefslogtreecommitdiffstats
path: root/sys/net/if_vxlan.c
diff options
context:
space:
mode:
authorsephe <sephe@FreeBSD.org>2016-06-07 04:51:50 +0000
committersephe <sephe@FreeBSD.org>2016-06-07 04:51:50 +0000
commit7acd138965d96ffd22d5af9e51a5cc261951eb6a (patch)
tree8816b0f75c831a8e5070bc0b18af1929b457914e /sys/net/if_vxlan.c
parentbe6cf145bec7e3658cd25477592f21b906de159e (diff)
downloadFreeBSD-src-7acd138965d96ffd22d5af9e51a5cc261951eb6a.zip
FreeBSD-src-7acd138965d96ffd22d5af9e51a5cc261951eb6a.tar.gz
net: Use M_HASHTYPE_OPAQUE_HASH if the mbuf flowid has hash properties
Reviewed by: hps, erj, tuexen Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6688
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 a5631fc..f830b06 100644
--- a/sys/net/if_vxlan.c
+++ b/sys/net/if_vxlan.c
@@ -2237,8 +2237,7 @@ vxlan_pick_source_port(struct vxlan_softc *sc, struct mbuf *m)
range = sc->vxl_max_port - sc->vxl_min_port + 1;
/* check if flowid is set and not opaque */
- if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE &&
- M_HASHTYPE_GET(m) != M_HASHTYPE_OPAQUE)
+ if (M_HASHTYPE_ISHASH(m))
hash = m->m_pkthdr.flowid;
else
hash = jenkins_hash(m->m_data, ETHER_HDR_LEN,
OpenPOWER on IntegriCloud