Re: [PATCH v8 1/5] hostapd: afcd: add AFC daemon support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 28, 2024 at 09:08:31AM +0100, Lorenzo Bianconi wrote:
> Introduce Automated Frequency Coordination Daemon (AFCD) support
> for UNII-5 and UNII-7 6GHz bands.
> AFCD will be used by hostapd AFC client in order to forward the AFC
> request to the AFC coordinator and decouple AFC connection management
> from hostapd.
> AFC is required for Standard Power Devices (SPDs) to determine a lists
> of channels and EIRP/PSD powers that are available in the 6GHz spectrum.
> AFCD is tested with AFC DUT Test Harness [0].
> Add afc-reply.json as reference for replies from the AFC coordinator.

Was that afc-reply.json supposed to be afc-reply.txt or is the added
afc-reply.txt supposed to be renamed to match this? It seems to include
HTTP header with the JSON data, so I'm assuming the former..

> diff --git a/afc/afcd.c b/afc/afcd.c

> +#include <curl/curl.h>
> +#include <sys/un.h>
> +#include <sys/stat.h>
> +
> +#include "utils/includes.h"

hostap.git normally includes that includes.h before any system header
files. Is there some particular reason for not doing that here?

> +int main(int argc, char **argv)
> +{
> +	bool daemonize = false;
> +	char *pid_file = NULL;
> +
> +	if (os_program_init())
> +		return -1;
...

> +		case 'h':
> +			usage();
> +			return 0;
...
> +		default:
> +			usage();
> +			return -EINVAL;
...
> +	if (!url) {
> +		usage();
> +		return -EINVAL;
> +	}
...
> +	if (daemonize && os_daemonize(pid_file)) {
> +		wpa_printf(MSG_ERROR, "daemon: %s", strerror(errno));
> +		return -EINVAL;
> +	}
...
> +	return afcd_server_run();
> +}

There is supposed to be a matching os_program_deinit() call(s) whenever
os_program_init() is used. Not that it makes much of a difference in
this case, but at least that final one for a successful termination case
should do this to allow automated memory allocation checks to be
performed.
 
-- 
Jouni Malinen                                            PGP id EFC895FA

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux