hostapd: add support for rxkh_file
authorSybil127 <sybil127@outlook.com>
Thu, 23 May 2024 16:49:54 +0000 (18:49 +0200)
committerFelix Fietkau <nbd@nbd.name>
Thu, 12 Dec 2024 18:19:33 +0000 (19:19 +0100)
commit7306ae401cc2cf84210fb74f37aa17049bce2e9f
tree92dcb7d0c624ad434d923ed050e26d718907c1c4
parent97c8a94ec509407105db1b942ae5b8ab92252480
hostapd: add support for rxkh_file

Initial support for dynamic reload of RxKHs.

In order to check if RxKHs need reloading.
RxKHs defined in the rxkh_file first has to be parsed and formated,
the same way as hostapd will read from the file and also output,
with the command GET_RXKHS.
Then each list of RxKHs can be hashed and compared.

Ucode implementation of hostapds rkh_derive_key() function.
Hostapd converts hex keys with 128-bits or more when less than 256-bits
to 256-bits, and truncates those that are more than 256-bits.
See: https://w1.fi/cgit/hostap/commit/hostapd/config_file.c?id=245fc96e5f4b1c566b7eaa19180c774307ebed79

Signed-off-by: Sybil127 <sybil127@outlook.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/network/services/hostapd/files/hostapd.uc
package/network/services/hostapd/src/src/ap/ucode.c
package/network/services/hostapd/src/src/utils/ucode.c
package/network/services/hostapd/src/src/utils/ucode.h