Subject: Re: [PATCH net-next v3 2/7] net: nexthop: Add NHA_OP_FLAGS

From: Petr Machata <[email-masked]>
Date: Tue, 5 Mar 2024 11:42:24 +0100

Ido Schimmel <[email-masked]> writes:

> On Mon, Mar 04, 2024 at 09:51:15PM +0100, Petr Machata wrote:
>> @@ -2992,6 +2994,11 @@ static int nh_valid_get_del_req(const struct nlmsghdr *nlh,
>>  		return -EINVAL;
>>  	}
>>  
>> +	if (tb[NHA_OP_FLAGS])
>> +		*op_flags = nla_get_u32(tb[NHA_OP_FLAGS]);
>> +	else
>> +		*op_flags = 0;
>> +
>>  	return 0;
>>  }
>
> [...]
>
>> @@ -3151,6 +3161,11 @@ static int __nh_valid_dump_req(const struct nlmsghdr *nlh, struct nlattr **tb,
>>  		return -EINVAL;
>>  	}
>>  
>> +	if (tb[NHA_OP_FLAGS])
>> +		filter->op_flags = nla_get_bitfield32(tb[NHA_OP_FLAGS]).value;
>
> Shouldn't this be:
>
> filter->op_flags = nla_get_u32(tb[NHA_OP_FLAGS]);

D'oh, of course. I'm 99% sure I changed both instances, so I don't know
what happened. Ghosts :-/