Re: [PATCH net-next v2] net/sched: cls_flow: avoid integer overflow in perturb_period
From: Wei Tao
Date: Thu Nov 12 2026 - 21:55:42 EST
On Thu, 12 Nov 2026 08:44:46 -0500, Paolo Abeni wrote:
> Sashiko noted the added code could by simplified/substituted with
> a NLA_POLICY_FULL_RANGE(NLA_U32, &range):
> https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261106063823.99731-1-taowei@xxxxxxxxxx
Thanks. I replaced the open-coded checks with
NLA_POLICY_FULL_RANGE(NLA_U32, &flow_perturb_range) and passed extack to
nla_parse_nested_deprecated(), so both the create and the change paths are
validated by the parser. The range is 0 .. INT_MAX / HZ.
I will post v3 as a new thread shortly.
Thanks,
Wei Tao