mirror of
https://git.dn42.dev/dn42/registry.git
synced 2025-07-20 09:26:59 +08:00
Merge pull request '[dn42_schema_local.py] fix off by one error in _get_parent_inetnums()' (#3697) from lare/registry:update-check-pol into master
Reviewed-on: https://git.dn42.dev/dn42/registry/pulls/3697 Reviewed-by: schema-checker <schema-checker@noreply.dn42.dev>
This commit is contained in:
commit
5d0b0969fb
1 changed files with 2 additions and 2 deletions
|
@ -557,7 +557,7 @@ def _get_parent_inetnums(inetnum:str, fields:list=[], family:str=None) -> list[l
|
|||
|
||||
netlevel += 2
|
||||
out=[blk0_6,blk0_4]
|
||||
for i in range(1,subnet_len): #ipv4 subnet length
|
||||
for i in range(1,subnet_len + 1): #ipv4 subnet length
|
||||
blk_inet = pretty_ip(inetrange(f'{inetnum.split("/")[0]}/{i}')[0])+f"_{str(i)}"
|
||||
blk_content = _get_file_content_upstream(filename=f"data/inetnum/{blk_inet}")
|
||||
if blk_content == [""]:
|
||||
|
@ -585,7 +585,7 @@ def _get_parent_inetnums(inetnum:str, fields:list=[], family:str=None) -> list[l
|
|||
|
||||
netlevel += 1
|
||||
out=[blk0]
|
||||
for i in range(1,subnet_len): #ipv6 subnet length (max=64)
|
||||
for i in range(1,subnet_len + 1): #ipv6 subnet length (max=64)
|
||||
blk_inet = _unexpand_ipv6(pretty_ip(inet6range(f'{_unexpand_ipv6(inetnum.split("/")[0])}/{i}')[0]))+f"_{str(i)}"
|
||||
blk_content = _get_file_content_upstream(filename=f"data/inet6num/{blk_inet}")
|
||||
if blk_content == [""]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue