Lines Matching defs:r0kh

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