Lines Matching refs:r0kh
1559 static int wpa_ft_rrb_init_r0kh_seq(struct ft_remote_r0kh *r0kh) in wpa_ft_rrb_init_r0kh_seq() argument
1561 if (r0kh->seq) in wpa_ft_rrb_init_r0kh_seq()
1564 r0kh->seq = os_zalloc(sizeof(*r0kh->seq)); in wpa_ft_rrb_init_r0kh_seq()
1565 if (!r0kh->seq) { in wpa_ft_rrb_init_r0kh_seq()
1570 dl_list_init(&r0kh->seq->rx.queue); in wpa_ft_rrb_init_r0kh_seq()
1581 struct ft_remote_r0kh *r0kh; in wpa_ft_rrb_lookup_r0kh() local
1587 r0kh = *wpa_auth->conf.r0kh_list; in wpa_ft_rrb_lookup_r0kh()
1589 r0kh = NULL; in wpa_ft_rrb_lookup_r0kh()
1590 for (; r0kh; r0kh = r0kh->next) { in wpa_ft_rrb_lookup_r0kh()
1591 if (r0kh->id_len == 1 && r0kh->id[0] == '*') in wpa_ft_rrb_lookup_r0kh()
1592 *r0kh_wildcard = r0kh; in wpa_ft_rrb_lookup_r0kh()
1593 if (f_r0kh_id && r0kh->id_len == f_r0kh_id_len && in wpa_ft_rrb_lookup_r0kh()
1594 os_memcmp_const(f_r0kh_id, r0kh->id, f_r0kh_id_len) == 0) in wpa_ft_rrb_lookup_r0kh()
1595 *r0kh_out = r0kh; in wpa_ft_rrb_lookup_r0kh()
1680 struct ft_remote_r0kh *r0kh, *prev = NULL; in wpa_ft_rrb_del_r0kh() local
1685 for (r0kh = *wpa_auth->conf.r0kh_list; r0kh; r0kh = r0kh->next) { in wpa_ft_rrb_del_r0kh()
1686 if (r0kh == timeout_ctx) in wpa_ft_rrb_del_r0kh()
1688 prev = r0kh; in wpa_ft_rrb_del_r0kh()
1690 if (!r0kh) in wpa_ft_rrb_del_r0kh()
1693 prev->next = r0kh->next; in wpa_ft_rrb_del_r0kh()
1695 *wpa_auth->conf.r0kh_list = r0kh->next; in wpa_ft_rrb_del_r0kh()
1696 if (r0kh->seq) in wpa_ft_rrb_del_r0kh()
1697 wpa_ft_rrb_seq_flush(wpa_auth, r0kh->seq, 0); in wpa_ft_rrb_del_r0kh()
1698 os_free(r0kh->seq); in wpa_ft_rrb_del_r0kh()
1699 os_free(r0kh); in wpa_ft_rrb_del_r0kh()
1704 struct ft_remote_r0kh *r0kh, int timeout) in wpa_ft_rrb_r0kh_replenish() argument
1708 wpa_auth, r0kh); in wpa_ft_rrb_r0kh_replenish()
1713 struct ft_remote_r0kh *r0kh, int timeout) in wpa_ft_rrb_r0kh_timeout() argument
1715 eloop_cancel_timeout(wpa_ft_rrb_del_r0kh, wpa_auth, r0kh); in wpa_ft_rrb_r0kh_timeout()
1719 wpa_auth, r0kh); in wpa_ft_rrb_r0kh_timeout()
1729 struct ft_remote_r0kh *r0kh; in wpa_ft_rrb_add_r0kh() local
1734 r0kh = os_zalloc(sizeof(*r0kh)); in wpa_ft_rrb_add_r0kh()
1735 if (!r0kh) in wpa_ft_rrb_add_r0kh()
1739 os_memcpy(r0kh->addr, src_addr, sizeof(r0kh->addr)); in wpa_ft_rrb_add_r0kh()
1743 os_memcpy(r0kh->id, r0kh_id, id_len); in wpa_ft_rrb_add_r0kh()
1744 r0kh->id_len = id_len; in wpa_ft_rrb_add_r0kh()
1746 os_memcpy(r0kh->key, r0kh_wildcard->key, sizeof(r0kh->key)); in wpa_ft_rrb_add_r0kh()
1748 r0kh->next = *wpa_auth->conf.r0kh_list; in wpa_ft_rrb_add_r0kh()
1749 *wpa_auth->conf.r0kh_list = r0kh; in wpa_ft_rrb_add_r0kh()
1753 wpa_auth, r0kh); in wpa_ft_rrb_add_r0kh()
1755 if (wpa_ft_rrb_init_r0kh_seq(r0kh) < 0) in wpa_ft_rrb_add_r0kh()
1758 return r0kh; in wpa_ft_rrb_add_r0kh()
1836 struct ft_remote_r0kh *r0kh; in wpa_ft_deinit_seq() local
1842 r0kh = *wpa_auth->conf.r0kh_list; in wpa_ft_deinit_seq()
1844 r0kh = NULL; in wpa_ft_deinit_seq()
1845 for (; r0kh; r0kh = r0kh->next) { in wpa_ft_deinit_seq()
1846 if (!r0kh->seq) in wpa_ft_deinit_seq()
1848 wpa_ft_rrb_seq_flush(wpa_auth, r0kh->seq, 0); in wpa_ft_deinit_seq()
1849 os_free(r0kh->seq); in wpa_ft_deinit_seq()
1850 r0kh->seq = NULL; in wpa_ft_deinit_seq()
1869 struct ft_remote_r0kh *r0kh, *r0kh_next, *r0kh_prev = NULL; in wpa_ft_deinit_rkh_tmp() local
1873 r0kh = *wpa_auth->conf.r0kh_list; in wpa_ft_deinit_rkh_tmp()
1875 r0kh = NULL; in wpa_ft_deinit_rkh_tmp()
1876 while (r0kh) { in wpa_ft_deinit_rkh_tmp()
1877 r0kh_next = r0kh->next; in wpa_ft_deinit_rkh_tmp()
1879 r0kh) > 0) { in wpa_ft_deinit_rkh_tmp()
1884 os_free(r0kh); in wpa_ft_deinit_rkh_tmp()
1886 r0kh_prev = r0kh; in wpa_ft_deinit_rkh_tmp()
1888 r0kh = r0kh_next; in wpa_ft_deinit_rkh_tmp()
1922 struct ft_remote_r0kh *r0kh, *r0kh_wildcard; in wpa_ft_block_r0kh() local
1928 &r0kh, &r0kh_wildcard); in wpa_ft_block_r0kh()
1938 if (r0kh) { in wpa_ft_block_r0kh()
1939 wpa_ft_rrb_r0kh_timeout(wpa_auth, r0kh, in wpa_ft_block_r0kh()
1941 os_memset(r0kh->addr, 0, ETH_ALEN); in wpa_ft_block_r0kh()
1968 struct ft_remote_r0kh *r0kh, *r0kh_wildcard; in wpa_ft_pull_pmk_r1() local
2002 &r0kh, &r0kh_wildcard); in wpa_ft_pull_pmk_r1()
2007 if (r0kh) { in wpa_ft_pull_pmk_r1()
2008 wpa_ft_rrb_r0kh_replenish(sm->wpa_auth, r0kh, r0kh_timeout); in wpa_ft_pull_pmk_r1()
2012 r0kh = wpa_ft_rrb_add_r0kh(sm->wpa_auth, r0kh_wildcard, in wpa_ft_pull_pmk_r1()
2017 if (r0kh == NULL) { in wpa_ft_pull_pmk_r1()
2022 if (is_zero_ether_addr(r0kh->addr)) { in wpa_ft_pull_pmk_r1()
2027 if (ether_addr_equal(r0kh->addr, sm->wpa_auth->addr)) { in wpa_ft_pull_pmk_r1()
2033 key = r0kh->key; in wpa_ft_pull_pmk_r1()
2034 key_len = sizeof(r0kh->key); in wpa_ft_pull_pmk_r1()
2036 if (r0kh->seq->rx.num_last == 0) { in wpa_ft_pull_pmk_r1()
2039 wpa_ft_rrb_seq_req(sm->wpa_auth, r0kh->seq, r0kh->addr, in wpa_ft_pull_pmk_r1()
2040 r0kh->id, r0kh->id_len, f_r1kh_id, key, in wpa_ft_pull_pmk_r1()
2046 MAC2STR(sm->wpa_auth->addr), MAC2STR(r0kh->addr)); in wpa_ft_pull_pmk_r1()
2055 if (wpa_ft_new_seq(r0kh->seq, &f_seq) < 0) { in wpa_ft_pull_pmk_r1()
2077 wpa_ft_rrb_oui_send(sm->wpa_auth, r0kh->addr, FT_PACKET_R0KH_R1KH_PULL, in wpa_ft_pull_pmk_r1()
2122 const u8 *r0kh = sm->wpa_auth->conf.r0_key_holder; in wpa_auth_derive_ptk_ft() local
2154 r0kh, r0kh_len, sm->addr, in wpa_auth_derive_ptk_ft()
2985 const u8 *r0kh = sm->r0kh_id; in wpa_ft_psk_pmk_r1() local
3000 if (wpa_derive_pmk_r0(pmk, PMK_LEN, ssid, ssid_len, mdid, r0kh, in wpa_ft_psk_pmk_r1()
4155 struct ft_remote_r0kh *r0kh, *r0kh_wildcard; in wpa_ft_rrb_rx_r1() local
4187 wpa_ft_rrb_lookup_r0kh(wpa_auth, f_r0kh_id, f_r0kh_id_len, &r0kh, in wpa_ft_rrb_rx_r1()
4189 if (r0kh) { in wpa_ft_rrb_rx_r1()
4190 key = r0kh->key; in wpa_ft_rrb_rx_r1()
4191 key_len = sizeof(r0kh->key); in wpa_ft_rrb_rx_r1()
4201 if (r0kh) { in wpa_ft_rrb_rx_r1()
4202 seq_ret = wpa_ft_rrb_seq_chk(r0kh->seq, src_addr, enc, enc_len, in wpa_ft_rrb_rx_r1()
4207 (!r0kh || !ether_addr_equal(r0kh->addr, src_addr))) { in wpa_ft_rrb_rx_r1()
4219 if (!r0kh) in wpa_ft_rrb_rx_r1()
4220 r0kh = wpa_ft_rrb_add_r0kh(wpa_auth, r0kh_wildcard, src_addr, in wpa_ft_rrb_rx_r1()
4223 if (!r0kh) in wpa_ft_rrb_rx_r1()
4227 wpa_ft_rrb_seq_req(wpa_auth, r0kh->seq, src_addr, f_r0kh_id, in wpa_ft_rrb_rx_r1()
4233 wpa_ft_rrb_seq_accept(wpa_auth, r0kh->seq, src_addr, auth, auth_len, in wpa_ft_rrb_rx_r1()
4235 wpa_ft_rrb_r0kh_replenish(wpa_auth, r0kh, in wpa_ft_rrb_rx_r1()
4456 struct ft_remote_r0kh *r0kh = NULL; in wpa_ft_rrb_rx_seq() local
4484 &r0kh, &r0kh_wildcard); in wpa_ft_rrb_rx_seq()
4486 (!r0kh || !ether_addr_equal(r0kh->addr, src_addr))) { in wpa_ft_rrb_rx_seq()
4491 if (r0kh) { in wpa_ft_rrb_rx_seq()
4492 *key = r0kh->key; in wpa_ft_rrb_rx_seq()
4493 *key_len = sizeof(r0kh->key); in wpa_ft_rrb_rx_seq()
4525 if (!r0kh) in wpa_ft_rrb_rx_seq()
4526 r0kh = wpa_ft_rrb_add_r0kh(wpa_auth, r0kh_wildcard, in wpa_ft_rrb_rx_seq()
4530 if (!r0kh) in wpa_ft_rrb_rx_seq()
4533 wpa_ft_rrb_r0kh_replenish(wpa_auth, r0kh, ftRRBseqTimeout); in wpa_ft_rrb_rx_seq()
4534 *rkh_seq = r0kh->seq; in wpa_ft_rrb_rx_seq()
4536 *r0kh_out = r0kh; in wpa_ft_rrb_rx_seq()
4640 struct ft_remote_r0kh *r0kh = NULL, *r0kh_wildcard = NULL; in wpa_ft_rrb_rx_seq_resp() local
4655 &key_len, &r0kh, &r1kh, &r0kh_wildcard, in wpa_ft_rrb_rx_seq_resp()
4680 if (r0kh) { in wpa_ft_rrb_rx_seq_resp()
4681 wpa_ft_rrb_r0kh_replenish(wpa_auth, r0kh, in wpa_ft_rrb_rx_seq_resp()
4684 os_memcpy(r0kh->addr, src_addr, ETH_ALEN); in wpa_ft_rrb_rx_seq_resp()