Subject: Re: [PATCH iproute2-next] ip: add AMT support

From: Stephen Hemminger <[email-masked]>
Date: Sun, 24 Oct 2021 16:46:41 -0700

On Sat, 23 Oct 2021 19:36:11 +0000
Taehee Yoo <[email-masked]> wrote:

> +	if (tb[IFLA_AMT_MODE] && RTA_PAYLOAD(tb[IFLA_AMT_MODE]) < sizeof(__u32))
> +		return;

What is this check here for? Is there a case where kernel returns
data without valid mode?

> +
> +	if (tb[IFLA_AMT_MODE]) {
> +		print_string(PRINT_ANY,
> +			     "mode",
> +			     "%s ",
> +			     modename[rta_getattr_u32(tb[IFLA_AMT_MODE])]);
> +	}