[PATCH 1/1] macsec_linux: exit early when missing macsec kernel module

michael-dev michael-dev at fami-braun.de
Tue Aug 22 07:54:31 PDT 2017

Am 22.08.2017 16:16, schrieb Sabrina Dubroca:
>> +	int macsec_genl_id = genl_ctrl_resolve(sk, "macsec");
> I'm not sure what version of the C standard hostap follows, but I
> don't remember seeing mixed declarations and code.

you're right.

>> +	if (macsec_check_macsec() < 0) {
>> +		wpa_printf(MSG_ERROR, DRV_PREFIX "macsec kernel module missing");
> That's not quite true. It's unlikely, but possible, that the check
> failed in the alloc or connect steps. Since all the failure cases
> already output an error, I'd drop this one, or add it to the "genl
> resolve failed" ("genl resolve failed -- the macsec kernel module is
> probably missing" or similar).

I'll change it while I'm at it.

> BTW, your patch led me to check if we could make the macsec module
> autoload, and I just submitted this patch to the kernel:
> https://patchwork.ozlabs.org/patch/804437/


M. Braun

More information about the Hostap mailing list