Deleted Added
full compact
ieee80211_crypto_tkip.c (147252) ieee80211_crypto_tkip.c (148863)
1/*-
2 * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 16 unchanged lines hidden (view full) ---

25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 16 unchanged lines hidden (view full) ---

25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_crypto_tkip.c 147252 2005-06-10 16:11:24Z sam $");
33__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_crypto_tkip.c 148863 2005-08-08 18:46:36Z sam $");
34
35/*
36 * IEEE 802.11i TKIP crypto support.
37 *
38 * Part of this module is derived from similar code in the Host
39 * AP driver. The code is used with the consent of the author and
40 * it's license is included below.
41 */

--- 292 unchanged lines hidden (view full) ---

334
335 michael_mic(ctx, k->wk_rxmic,
336 m, hdrlen, m->m_pkthdr.len - (hdrlen + tkip.ic_miclen),
337 mic);
338 m_copydata(m, m->m_pkthdr.len - tkip.ic_miclen,
339 tkip.ic_miclen, mic0);
340 if (memcmp(mic, mic0, tkip.ic_miclen)) {
341 /* NB: 802.11 layer handles statistic and debug msg */
34
35/*
36 * IEEE 802.11i TKIP crypto support.
37 *
38 * Part of this module is derived from similar code in the Host
39 * AP driver. The code is used with the consent of the author and
40 * it's license is included below.
41 */

--- 292 unchanged lines hidden (view full) ---

334
335 michael_mic(ctx, k->wk_rxmic,
336 m, hdrlen, m->m_pkthdr.len - (hdrlen + tkip.ic_miclen),
337 mic);
338 m_copydata(m, m->m_pkthdr.len - tkip.ic_miclen,
339 tkip.ic_miclen, mic0);
340 if (memcmp(mic, mic0, tkip.ic_miclen)) {
341 /* NB: 802.11 layer handles statistic and debug msg */
342 ieee80211_notify_michael_failure(ic, wh, k->wk_keyix);
342 ieee80211_notify_michael_failure(ic, wh,
343 k->wk_rxkeyix != IEEE80211_KEYIX_NONE ?
344 k->wk_rxkeyix : k->wk_keyix);
343 return 0;
344 }
345 }
346 /*
347 * Strip MIC from the tail.
348 */
349 m_adj(m, -tkip.ic_miclen);
350

--- 642 unchanged lines hidden ---
345 return 0;
346 }
347 }
348 /*
349 * Strip MIC from the tail.
350 */
351 m_adj(m, -tkip.ic_miclen);
352

--- 642 unchanged lines hidden ---