Lines Matching refs:rkh_seq
936 struct ft_remote_seq *rkh_seq, int cb) in wpa_ft_rrb_seq_flush() argument
940 dl_list_for_each_safe(item, n, &rkh_seq->rx.queue, in wpa_ft_rrb_seq_flush()
960 struct ft_remote_seq *rkh_seq, const u8 *src_addr, in wpa_ft_rrb_seq_req() argument
984 if (dl_list_len(&rkh_seq->rx.queue) >= ftRRBmaxQueueLen) { in wpa_ft_rrb_seq_req()
1033 dl_list_add(&rkh_seq->rx.queue, &item->list); in wpa_ft_rrb_seq_req()
1058 wpa_ft_rrb_seq_chk(struct ft_remote_seq *rkh_seq, const u8 *src_addr, in wpa_ft_rrb_seq_chk() argument
1074 if (rkh_seq->rx.num_last == 0) { in wpa_ft_rrb_seq_chk()
1079 if (le_to_host32(msg_both->dom) != rkh_seq->rx.dom) { in wpa_ft_rrb_seq_chk()
1088 os_reltime_sub(&now, &rkh_seq->rx.time_offset, &now_remote); in wpa_ft_rrb_seq_chk()
1097 rkh_off = rkh_seq->rx.last[rkh_seq->rx.offsetidx]; in wpa_ft_rrb_seq_chk()
1103 for (i = 0; i < rkh_seq->rx.num_last; i++) { in wpa_ft_rrb_seq_chk()
1104 if (rkh_seq->rx.last[i] == msg_seq) in wpa_ft_rrb_seq_chk()
1129 struct ft_remote_seq *rkh_seq, const u8 *src_addr, in wpa_ft_rrb_seq_accept() argument
1145 if (rkh_seq->rx.num_last < FT_REMOTE_SEQ_BACKLOG) { in wpa_ft_rrb_seq_accept()
1146 rkh_seq->rx.last[rkh_seq->rx.num_last] = msg_seq; in wpa_ft_rrb_seq_accept()
1147 rkh_seq->rx.num_last++; in wpa_ft_rrb_seq_accept()
1151 rkh_off = rkh_seq->rx.last[rkh_seq->rx.offsetidx]; in wpa_ft_rrb_seq_accept()
1152 for (i = 0; i < rkh_seq->rx.num_last; i++) { in wpa_ft_rrb_seq_accept()
1153 msg_off = rkh_seq->rx.last[i] - rkh_off; in wpa_ft_rrb_seq_accept()
1154 min_off = rkh_seq->rx.last[minidx] - rkh_off; in wpa_ft_rrb_seq_accept()
1155 if (msg_off < min_off && i != rkh_seq->rx.offsetidx) in wpa_ft_rrb_seq_accept()
1158 rkh_seq->rx.last[rkh_seq->rx.offsetidx] = msg_seq; in wpa_ft_rrb_seq_accept()
1159 rkh_seq->rx.offsetidx = minidx; in wpa_ft_rrb_seq_accept()
1169 static int wpa_ft_new_seq(struct ft_remote_seq *rkh_seq, in wpa_ft_new_seq() argument
1177 if (!rkh_seq->tx.dom) { in wpa_ft_new_seq()
1178 if (random_get_bytes((u8 *) &rkh_seq->tx.seq, in wpa_ft_new_seq()
1179 sizeof(rkh_seq->tx.seq))) { in wpa_ft_new_seq()
1182 rkh_seq->tx.seq = now.usec; in wpa_ft_new_seq()
1184 if (random_get_bytes((u8 *) &rkh_seq->tx.dom, in wpa_ft_new_seq()
1185 sizeof(rkh_seq->tx.dom))) { in wpa_ft_new_seq()
1188 rkh_seq->tx.dom = now.usec; in wpa_ft_new_seq()
1190 rkh_seq->tx.dom |= 1; in wpa_ft_new_seq()
1193 f_seq->dom = host_to_le32(rkh_seq->tx.dom); in wpa_ft_new_seq()
1194 f_seq->seq = host_to_le32(rkh_seq->tx.seq); in wpa_ft_new_seq()
1197 rkh_seq->tx.seq++; in wpa_ft_new_seq()
4449 struct ft_remote_seq **rkh_seq, in wpa_ft_rrb_rx_seq() argument
4534 *rkh_seq = r0kh->seq; in wpa_ft_rrb_rx_seq()
4550 *rkh_seq = r1kh->seq; in wpa_ft_rrb_rx_seq()
4573 struct ft_remote_seq *rkh_seq = NULL; in wpa_ft_rrb_rx_seq_req() local
4581 enc, enc_len, auth, auth_len, &rkh_seq, &key, in wpa_ft_rrb_rx_seq_req()
4591 if (wpa_ft_new_seq(rkh_seq, &f_seq) < 0) { in wpa_ft_rrb_rx_seq_req()
4644 struct ft_remote_seq *rkh_seq = NULL; in wpa_ft_rrb_rx_seq_resp() local
4654 enc, enc_len, auth, auth_len, &rkh_seq, &key, in wpa_ft_rrb_rx_seq_resp()
4664 dl_list_for_each(item, &rkh_seq->rx.queue, struct ft_remote_item, in wpa_ft_rrb_rx_seq_resp()
4694 seq_ret = wpa_ft_rrb_seq_chk(rkh_seq, src_addr, enc, enc_len, auth, in wpa_ft_rrb_rx_seq_resp()
4698 wpa_ft_rrb_seq_accept(wpa_auth, rkh_seq, src_addr, auth, in wpa_ft_rrb_rx_seq_resp()
4712 rkh_seq->rx.num_last = 2; in wpa_ft_rrb_rx_seq_resp()
4713 rkh_seq->rx.dom = msg_dom; in wpa_ft_rrb_rx_seq_resp()
4714 rkh_seq->rx.offsetidx = 0; in wpa_ft_rrb_rx_seq_resp()
4716 rkh_seq->rx.last[0] = msg_seq - FT_REMOTE_SEQ_BACKLOG - in wpa_ft_rrb_rx_seq_resp()
4717 dl_list_len(&rkh_seq->rx.queue); in wpa_ft_rrb_rx_seq_resp()
4718 rkh_seq->rx.last[1] = msg_seq; in wpa_ft_rrb_rx_seq_resp()
4722 os_reltime_sub(&now, &now_remote, &rkh_seq->rx.time_offset); in wpa_ft_rrb_rx_seq_resp()
4725 wpa_ft_rrb_seq_flush(wpa_auth, rkh_seq, 1); in wpa_ft_rrb_rx_seq_resp()