summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornaddy <naddy@openbsd.org>2009-01-27 12:58:27 +0000
committernaddy <naddy@openbsd.org>2009-01-27 12:58:27 +0000
commit315af8dbb4234c7768ad431b9c6b789c5bb294d2 (patch)
treee82a420b4d71df2082fa2f62e56107f269d088c3
parentAgain, no need to double check if neighbor exists. (diff)
downloadwireguard-openbsd-315af8dbb4234c7768ad431b9c6b789c5bb294d2.tar.xz
wireguard-openbsd-315af8dbb4234c7768ad431b9c6b789c5bb294d2.zip
make the hardware/no hardware tag stripping cases consistent and don't
hash the VLAN priority; ok henning@
-rw-r--r--sys/net/if_trunk.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/if_trunk.c b/sys/net/if_trunk.c
index f9707231bd9..ce057335233 100644
--- a/sys/net/if_trunk.c
+++ b/sys/net/if_trunk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_trunk.c,v 1.63 2008/12/14 23:08:52 brad Exp $ */
+/* $OpenBSD: if_trunk.c,v 1.64 2009/01/27 12:58:27 naddy Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Reyk Floeter <reyk@openbsd.org>
@@ -1006,7 +1006,8 @@ trunk_hashmbuf(struct mbuf *m, u_int32_t key)
if ((vlan = (u_int16_t *)
trunk_gethdr(m, off, EVL_ENCAPLEN, &vlanbuf)) == NULL)
return (p);
- p = hash32_buf(vlan, sizeof(*vlan), p);
+ ether_vtag = EVL_VLANOFTAG(*vlan);
+ p = hash32_buf(&ether_vtag, sizeof(ether_vtag), p);
etype = ntohs(vlan[1]);
off += EVL_ENCAPLEN;
}