From 3ab0d4f25339a937ff0f5714eecbc9e55c263d16 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 17 Jun 2024 05:34:43 +0000 Subject: [PATCH] COrrect daddr gt handling in RuleNode::__lt__ --- genrules.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/genrules.py b/genrules.py index 1e9c978..647152a 100755 --- a/genrules.py +++ b/genrules.py @@ -348,9 +348,9 @@ class RuleNode: elif selfsrc is not None and othersrc is not None: o = selfsrc.ord(othersrc) - if o == ORD_LESS: - return True - return [a for a in self.action if type(a) != IpRule] < [b for b in other.action if type(b) != IpRule] + if o == ORD_EQUAL: + return [a for a in self.action if type(a) != IpRule] < [b for b in other.action if type(b) != IpRule] + return o == ORD_LESS def maybe_join(self, neighbor): if self.ty == RuleAction.CONDITIONS and neighbor.ty == RuleAction.CONDITIONS: -- 2.39.5