Deleted Added
full compact
ieee80211_freebsd.c (193312) ieee80211_freebsd.c (193541)
1/*-
2 * Copyright (c) 2003-2009 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

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

19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2003-2009 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

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

19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26#include <sys/cdefs.h>
27__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_freebsd.c 193312 2009-06-02 16:57:27Z sam $");
27__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_freebsd.c 193541 2009-06-05 23:10:30Z sam $");
28
29/*
30 * IEEE 802.11 support (FreeBSD-specific code)
31 */
32#include "opt_wlan.h"
33
34#include <sys/param.h>
35#include <sys/kernel.h>

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

523 CURVNET_SET(ifp->if_vnet);
524 rt_ieee80211msg(ifp, RTM_IEEE80211_SCAN, NULL, 0);
525 CURVNET_RESTORE();
526}
527
528void
529ieee80211_notify_replay_failure(struct ieee80211vap *vap,
530 const struct ieee80211_frame *wh, const struct ieee80211_key *k,
28
29/*
30 * IEEE 802.11 support (FreeBSD-specific code)
31 */
32#include "opt_wlan.h"
33
34#include <sys/param.h>
35#include <sys/kernel.h>

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

523 CURVNET_SET(ifp->if_vnet);
524 rt_ieee80211msg(ifp, RTM_IEEE80211_SCAN, NULL, 0);
525 CURVNET_RESTORE();
526}
527
528void
529ieee80211_notify_replay_failure(struct ieee80211vap *vap,
530 const struct ieee80211_frame *wh, const struct ieee80211_key *k,
531 u_int64_t rsc)
531 u_int64_t rsc, int tid)
532{
533 struct ifnet *ifp = vap->iv_ifp;
534
535 IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_CRYPTO, wh->i_addr2,
536 "%s replay detected <rsc %ju, csc %ju, keyix %u rxkeyix %u>",
537 k->wk_cipher->ic_name, (intmax_t) rsc,
532{
533 struct ifnet *ifp = vap->iv_ifp;
534
535 IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_CRYPTO, wh->i_addr2,
536 "%s replay detected <rsc %ju, csc %ju, keyix %u rxkeyix %u>",
537 k->wk_cipher->ic_name, (intmax_t) rsc,
538 (intmax_t) k->wk_keyrsc[IEEE80211_NONQOS_TID],
538 (intmax_t) k->wk_keyrsc[tid],
539 k->wk_keyix, k->wk_rxkeyix);
540
541 if (ifp != NULL) { /* NB: for cipher test modules */
542 struct ieee80211_replay_event iev;
543
544 IEEE80211_ADDR_COPY(iev.iev_dst, wh->i_addr1);
545 IEEE80211_ADDR_COPY(iev.iev_src, wh->i_addr2);
546 iev.iev_cipher = k->wk_cipher->ic_cipher;
547 if (k->wk_rxkeyix != IEEE80211_KEYIX_NONE)
548 iev.iev_keyix = k->wk_rxkeyix;
549 else
550 iev.iev_keyix = k->wk_keyix;
539 k->wk_keyix, k->wk_rxkeyix);
540
541 if (ifp != NULL) { /* NB: for cipher test modules */
542 struct ieee80211_replay_event iev;
543
544 IEEE80211_ADDR_COPY(iev.iev_dst, wh->i_addr1);
545 IEEE80211_ADDR_COPY(iev.iev_src, wh->i_addr2);
546 iev.iev_cipher = k->wk_cipher->ic_cipher;
547 if (k->wk_rxkeyix != IEEE80211_KEYIX_NONE)
548 iev.iev_keyix = k->wk_rxkeyix;
549 else
550 iev.iev_keyix = k->wk_keyix;
551 iev.iev_keyrsc = k->wk_keyrsc[0]; /* XXX need tid */
551 iev.iev_keyrsc = k->wk_keyrsc[tid];
552 iev.iev_rsc = rsc;
553 CURVNET_SET(ifp->if_vnet);
554 rt_ieee80211msg(ifp, RTM_IEEE80211_REPLAY, &iev, sizeof(iev));
555 CURVNET_RESTORE();
556 }
557}
558
559void

--- 197 unchanged lines hidden ---
552 iev.iev_rsc = rsc;
553 CURVNET_SET(ifp->if_vnet);
554 rt_ieee80211msg(ifp, RTM_IEEE80211_REPLAY, &iev, sizeof(iev));
555 CURVNET_RESTORE();
556 }
557}
558
559void

--- 197 unchanged lines hidden ---