]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
tools: ynl: handle pad type during decode
authorJakub Kicinski <kuba@kernel.org>
Tue, 10 Mar 2026 00:53:33 +0000 (17:53 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 11 Mar 2026 02:30:03 +0000 (19:30 -0700)
Apparently Python code only handled the 'pad' type in structs
until now. Add it to attr decoding. nlctrl policy dumps need it.

Link: https://patch.msgid.link/20260310005337.3594225-2-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/net/ynl/pyynl/lib/ynl.py

index 9774005e7ad1f18b0452f04fc8f34c15f6463c6d..8302c19ab55cb65be8e53dcfcd7c3d1151a9c523 100644 (file)
@@ -814,7 +814,9 @@ class YnlFamily(SpecFamily):
                 continue
 
             try:
-                if attr_spec["type"] == 'nest':
+                if attr_spec["type"] == 'pad':
+                    continue
+                elif attr_spec["type"] == 'nest':
                     subdict = self._decode(NlAttrs(attr.raw),
                                            attr_spec['nested-attributes'],
                                            search_attrs)