Re: [PATCH] add new macsec offload modes to abstract device-level details

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

 



On Tue, Feb 06, 2024 at 03:15:03PM +0100, Sabrina Dubroca wrote:
> Currently, users have to guess which offload mode their hardware
> provides, as the kernel doesn't expose this information.
> 
> Add an "on" mode which requires offload (either to mac or phy) and a
> "prefer" mode which allows fallback to SW when offload (either to mac
> or phy) is unavailable.
> 
> Also rename the existing modes to string values to make the config
> file a bit clearer.
> 
> Signed-off-by: Sabrina Dubroca <sd@xxxxxxxxxxxxxxx>
> ---
> [...]
>  static int hostapd_config_fill(struct hostapd_config *conf,
>  			       struct hostapd_bss_config *bss,
> @@ -4816,15 +4839,12 @@ static int hostapd_config_fill(struct hostapd_config *conf,
>  	} else if (os_strcmp(buf, "macsec_replay_window") == 0) {
>  		bss->macsec_replay_window = atoi(pos);
>  	} else if (os_strcmp(buf, "macsec_offload") == 0) {
> -		int macsec_offload = atoi(pos);
> -
> -		if (macsec_offload < 0 || macsec_offload > 2) {
> +		if (parse_macsec_offload(bss, pos)) {
>  			wpa_printf(MSG_ERROR,
> -				   "Line %d: invalid macsec_offload (%d): '%s'.",
> -				   line, macsec_offload, pos);
> +				   "Line %d: invalid macsec_offload: '%s'.",


Hi,

the "macsec_offload" property now needs to be added to the
"dont_quote" array in dbus_new_handlers.c, otherwise the string value
received from D-Bus gets enclosed in double quotes and is rejected as
invalid:

  ..
  wpa_dbus_dict_open_read: start reading a dict entry
  wpa_dbus_dict_get_entry: dict entry key: macsec_offload
  wpa_dbus_dict_get_entry: dict entry variant content type: s
  _wpa_dbus_dict_fill_value_from_variant: string value: mac
  Line 0: Invalid macsec_offload: '"mac"'.

Beniamino

Attachment: signature.asc
Description: PGP signature

_______________________________________________
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