diff options
author | 2016-01-22 11:56:14 +0000 | |
---|---|---|
committer | 2016-01-22 11:56:14 +0000 | |
commit | 263c07fc0435147652c3a6f4daaf551e8c010f30 (patch) | |
tree | ce3023f33bbdbad4353257a9275c7fbd33670ad2 | |
parent | Support tunnel VRF on etherip(4) (diff) | |
download | wireguard-openbsd-263c07fc0435147652c3a6f4daaf551e8c010f30.tar.xz wireguard-openbsd-263c07fc0435147652c3a6f4daaf551e8c010f30.zip |
Drop packets whose VNI flag is not set and VNI is not zero
ok reyk@ yasuoka@
-rw-r--r-- | sys/net/if_vxlan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c index a220bff8352..748d494dcb9 100644 --- a/sys/net/if_vxlan.c +++ b/sys/net/if_vxlan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vxlan.c,v 1.36 2016/01/14 09:20:31 mpi Exp $ */ +/* $OpenBSD: if_vxlan.c,v 1.37 2016/01/22 11:56:14 goda Exp $ */ /* * Copyright (c) 2013 Reyk Floeter <reyk@openbsd.org> @@ -507,7 +507,7 @@ vxlan_lookup(struct mbuf *m, struct udphdr *uh, int iphlen, return (0); vni = ntohl(v.vxlan_id) >> VXLAN_VNI_S; - if ((v.vxlan_flags & htonl(VXLAN_FLAGS_VNI)) != 0) { + if ((v.vxlan_flags & htonl(VXLAN_FLAGS_VNI)) == 0) { if (vni != 0) return (0); |