mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
netlink: specs: conntrack: timestamp is a nest, not a be64
ctnetlink_dump_timestamp() wraps CTA_TIMESTAMP_START
and CTA_TIMESTAMP_STOP in a nest, but the spec declares CTA_TIMESTAMP
as a flat be64. ynl picks reply attributes out of the attribute set rather
than the operation's attribute list, so the mistyped attribute stops
the whole dump:
Error decoding 'timestamp' from 'conntrack-attrs'
Traceback (most recent call last):
File "tools/net/ynl/pyynl/cli.py", line 314, in main
reply = ynl.dump(args.dump, attrs)
File "tools/net/ynl/pyynl/lib/ynl.py", line 1082, in _decode
decoded = attr.as_scalar(attr_spec['type'], attr_spec.byte_order)
File "tools/net/ynl/pyynl/lib/ynl.py", line 291, in as_scalar
return format_.unpack(self.raw)[0]
struct.error: unpack requires a buffer of 8 bytes
The tstamp extension is only attached when CONFIG_NF_CONNTRACK_TIMESTAMP
is enabled and nf_conntrack_timestamp is turned on, which is off by default
and is why every dump does not hit this.
stop is omitted for live entries, so it stays optional like every other
member here. The pad member mirrors counter-attrs, which covers the same
nla_put_be64() padding.
Reported-by: Sashiko <netdev-bot+sashiko@kernel.org>
Closes: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260826220444.4054714-1-i.maximets@ovn.org
Reviewed-by: Hangbin Liu <liuhangbin@kylinos.cn>
Link: https://patch.msgid.link/20260910003852.2184031-2-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
219c6b768e
commit
68fd293d99
1 changed files with 16 additions and 2 deletions
Loading…
Add table
Add a link
Reference in a new issue