diff options
author | Donald Hunter <donald.hunter@gmail.com> | 2023-05-27 14:31:05 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-05-29 22:05:38 -0700 |
commit | 5ac18889bde04ed2d4f2559da01e9b160234525c (patch) | |
tree | 99d9506eef396f6fb7bf7026101ca0e9cbccfd2e /tools/net/ynl/lib | |
parent | 6d6bae63053d547e96fe4d2c9c8b4fc595bfc5ac (diff) | |
download | linux-stable-5ac18889bde04ed2d4f2559da01e9b160234525c.tar.gz linux-stable-5ac18889bde04ed2d4f2559da01e9b160234525c.tar.bz2 linux-stable-5ac18889bde04ed2d4f2559da01e9b160234525c.zip |
tools: ynl: Initialise fixed headers to 0 in genetlink-legacy
This eliminates the need for e.g. --json '{"dp-ifindex":0}' which is not
too big a deal for ovs but will get tiresome for fixed header structs that
have many members.
Signed-off-by: Donald Hunter <donald.hunter@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/net/ynl/lib')
-rw-r--r-- | tools/net/ynl/lib/ynl.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/net/ynl/lib/ynl.py b/tools/net/ynl/lib/ynl.py index 39a2296c0003..85ee6a4bee72 100644 --- a/tools/net/ynl/lib/ynl.py +++ b/tools/net/ynl/lib/ynl.py @@ -541,7 +541,7 @@ class YnlFamily(SpecFamily): if op.fixed_header: fixed_header_members = self.consts[op.fixed_header].members for m in fixed_header_members: - value = vals.pop(m.name) + value = vals.pop(m.name) if m.name in vals else 0 format = NlAttr.get_format(m.type, m.byte_order) msg += format.pack(value) for name, value in vals.items(): |