]> git.bitcoin.ninja Git - flowspec-xdp/commitdiff
Aavoid incomparable assertion when using mixed src/no-src rules
authorMatt Corallo <git@bluematt.me>
Sun, 16 Jun 2024 02:42:27 +0000 (02:42 +0000)
committerMatt Corallo <git@bluematt.me>
Sun, 16 Jun 2024 02:42:27 +0000 (02:42 +0000)
genrules.py

index 69fa58855ed31318570a88364e02e6da025aa293..1e9c978738e4e0976e6d68d98f215575fe288b43 100755 (executable)
@@ -350,7 +350,7 @@ class RuleNode:
 
         if o == ORD_LESS:
             return True
-        return self.action < other.action
+        return [a for a in self.action if type(a) != IpRule] < [b for b in other.action if type(b) != IpRule]
 
     def maybe_join(self, neighbor):
         if self.ty == RuleAction.CONDITIONS and neighbor.ty == RuleAction.CONDITIONS: