summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2007-08-14 20:33:48 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2007-08-14 20:33:48 +0000
commit132a0e7b03bc5484c352e1dc29924931af16e2ea (patch)
tree27342404facb14c5bfeca7fb4fc49717d7586318 /sys
parent92043168f10551988cfb03903c51dacd1ad4fa7b (diff)
Prevent sneaking in unencrypted packets into WEP traffic.
ok damien@, put it ok deraadt@
Diffstat (limited to 'sys')
-rw-r--r--sys/net80211/ieee80211_input.c5
-rw-r--r--sys/net80211/ieee80211_ioctl.h3
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c
index 682b5606b7d..7d3bc51e26f 100644
--- a/sys/net80211/ieee80211_input.c
+++ b/sys/net80211/ieee80211_input.c
@@ -1,5 +1,5 @@
/* $NetBSD: ieee80211_input.c,v 1.24 2004/05/31 11:12:24 dyoung Exp $ */
-/* $OpenBSD: ieee80211_input.c,v 1.61 2007/08/03 20:18:42 damien Exp $ */
+/* $OpenBSD: ieee80211_input.c,v 1.62 2007/08/14 20:33:47 bluhm Exp $ */
/*-
* Copyright (c) 2001 Atsushi Onoe
* Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
@@ -355,6 +355,9 @@ ieee80211_input(struct ifnet *ifp, struct mbuf *m, struct ieee80211_node *ni,
ic->ic_stats.is_rx_nowep++;
goto out;
}
+ } else if (ic->ic_flags & IEEE80211_F_WEPON) {
+ ic->ic_stats.is_rx_unencrypted++;
+ goto out;
}
#if NBPFILTER > 0
/* copy to listener after decrypt */
diff --git a/sys/net80211/ieee80211_ioctl.h b/sys/net80211/ieee80211_ioctl.h
index a00a52a62bb..5cf82ec1676 100644
--- a/sys/net80211/ieee80211_ioctl.h
+++ b/sys/net80211/ieee80211_ioctl.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_ioctl.h,v 1.9 2007/07/06 19:33:58 damien Exp $ */
+/* $OpenBSD: ieee80211_ioctl.h,v 1.10 2007/08/14 20:33:47 bluhm Exp $ */
/* $NetBSD: ieee80211_ioctl.h,v 1.7 2004/04/30 22:51:04 dyoung Exp $ */
/*-
@@ -47,6 +47,7 @@ struct ieee80211_stats {
u_int32_t is_rx_mcastecho; /* rx discard 'cuz mcast echo */
u_int32_t is_rx_notassoc; /* rx discard 'cuz sta !assoc */
u_int32_t is_rx_nowep; /* rx w/ wep but wep !config */
+ u_int32_t is_rx_unencrypted; /* rx w/o wep but wep config */
u_int32_t is_rx_wepfail; /* rx wep processing failed */
u_int32_t is_rx_decap; /* rx decapsulation failed */
u_int32_t is_rx_mgtdiscard; /* rx discard mgt frames */