From cc97bb80a256baf1137a3c3f29d5456569685cc6 Mon Sep 17 00:00:00 2001 From: lionsoul2014 Date: Thu, 30 Oct 2025 15:33:02 +0800 Subject: [PATCH] fix the bug of ip_sub_compare call --- binding/python/xdb/util.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/binding/python/xdb/util.py b/binding/python/xdb/util.py index a261599..0da1c32 100644 --- a/binding/python/xdb/util.py +++ b/binding/python/xdb/util.py @@ -104,10 +104,10 @@ class Version(object): self.ip_compare_func = ip_compare_func def ip_compare(self, ip1: bytes, ip2: bytes): - return self.ip_sub_compare(ip1, ip2, 0) + return ip_sub_compare(ip1, ip2, 0) def ip_sub_compare(self, ip1: bytes, buff: bytes, offset: int): - return self.ip_sub_compare(ip1, buff, offset) + return ip_sub_compare(ip1, buff, offset) def __str__(self): return '{{"id": {}, "name": "{}", "bytes": {}, "index_size": {}}}'.format( @@ -152,7 +152,7 @@ def version_from_name(name): def version_from_header(header): # old xdb 2.0 with IPv4 supports ONLY - if header.version <= XdbStructure30: + if header.version < XdbStructure30: return IPv4 # xdb 3.0 or later version