diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-04-03 18:57:35 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-04-03 18:57:35 +0000 |
commit | 3d0ed200f4c0faf787340e0f82bd696892c29173 (patch) | |
tree | 4aca4ae85b67ab4dce18b9f1e8bfbb0c00a393ae /sys/dev | |
parent | 793e25bb2967feec5656d474903cc5b6882fb350 (diff) |
Really drop data packets if the station is not associated. It does not
make sense to keep these packets around and send them out somewhen later
when they are no longer valid. OK mglocker@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/acx.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/ic/acx.c b/sys/dev/ic/acx.c index f9428093acf..1119066a852 100644 --- a/sys/dev/ic/acx.c +++ b/sys/dev/ic/acx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acx.c,v 1.70 2007/03/29 12:27:59 claudio Exp $ */ +/* $OpenBSD: acx.c,v 1.71 2007/04/03 18:57:34 claudio Exp $ */ /* * Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org> @@ -886,17 +886,18 @@ acx_start(struct ifnet *ifp) } else if (!IFQ_IS_EMPTY(&ifp->if_snd)) { struct ether_header *eh; + IFQ_DEQUEUE(&ifp->if_snd, m); + if (m == NULL) + break; + if (ic->ic_state != IEEE80211_S_RUN) { DPRINTF(("%s: data packet dropped due to " "not RUN. Current state %d\n", ifp->if_xname, ic->ic_state)); + m_freem(m); break; } - IFQ_DEQUEUE(&ifp->if_snd, m); - if (m == NULL) - break; - if (m->m_len < sizeof(struct ether_header)) { m = m_pullup(m, sizeof(struct ether_header)); if (m == NULL) { |