On Mon, Jan 25, 2016 at 01:05:17PM -0600, Dan Williams wrote:
> Drivers are stupid, and just like the platform ignores an all zeros
> permanent address, so should it ignore all ones.
>
> --- a/src/platform/nm-platform-utils.c
> +++ b/src/platform/nm-platform-utils.c
> @@ -142,7 +142,8 @@ nmp_utils_ethtool_get_permanent_address (const char 
> *ifname,
>               struct ethtool_perm_addr e;
>               guint8 _extra_data[NM_UTILS_HWADDR_LEN_MAX + 1];
>       } edata;
> -     guint zeros[NM_UTILS_HWADDR_LEN_MAX] = { 0 };
> +     static const guint8 zeros[NM_UTILS_HWADDR_LEN_MAX] = { 0x00 };
> +     static const guint8 ones[NM_UTILS_HWADDR_LEN_MAX] = { 0xFF };

This initializes only the first element of the array; since the only
way to set all elements to 0xFF from the declaration is to enumerate
them, probably the easiest alternative is just to add a memset.

Beniamino

Attachment: signature.asc
Description: PGP signature

_______________________________________________
networkmanager-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/networkmanager-list

Reply via email to