From 61fe7b6a4b8f3e2921b9f1f397c8bd2c891d410b Mon Sep 17 00:00:00 2001 From: Alina Lenk Date: Sat, 4 Jun 2022 14:37:52 +0200 Subject: [PATCH 7/8] generate_packets.py: explicitly unsupport empty variants of nonempty packets See osdn#44750 Signed-off-by: Alina Lenk --- common/generate_packets.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/common/generate_packets.py b/common/generate_packets.py index 6a6048994d..b2be9c2b47 100755 --- a/common/generate_packets.py +++ b/common/generate_packets.py @@ -1083,9 +1083,8 @@ class Variant: if self.keys_arg: self.keys_arg=",\n "+self.keys_arg - if len(self.fields)==0: - self.delta = False - self.no_packet = True + if not self.fields and packet.fields: + raise ValueError("empty variant for nonempty {self.packet_name} with capabilities {self.poscaps}".format(self = self)) if len(self.fields)>5 or self.name.split("_")[1]=="ruleset": self.handle_via_packet = True -- 2.34.1