Subject: Re: [RFC v2 bpf-next 5/7] libbpf: add API to get XDP/XSK supported features

From: Jakub Kicinski <[email-masked]>
Date: Tue, 17 Jan 2023 16:58:04 -0800

On Sat, 14 Jan 2023 16:54:35 +0100 Lorenzo Bianconi wrote:
> +	struct nlattr *na = (struct nlattr *)(NLMSG_DATA(nh) + GENL_HDRLEN);
> +
> +	na = (struct nlattr *)((void *)na + NLA_ALIGN(na->nla_len));
> +	if (na->nla_type == CTRL_ATTR_FAMILY_ID) {

Assuming layout of attributes within a message is a hard no-no.