From: Matt Corallo Date: Mon, 17 Jun 2024 05:34:43 +0000 (+0000) Subject: COrrect daddr gt handling in RuleNode::__lt__ X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=3ab0d4f25339a937ff0f5714eecbc9e55c263d16;p=flowspec-xdp COrrect daddr gt handling in RuleNode::__lt__ --- 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: