Commit 2ad36187 authored by Peter Müller's avatar Peter Müller Committed by Michael Tremer

location-importer: Fix parsing LACNIC-flavoured inetnums

My fault, again. :-/
Reported-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
Signed-off-by: default avatarPeter Müller <peter.mueller@ipfire.org>
Signed-off-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
parent f1f8927a
......@@ -3,7 +3,7 @@
# #
# libloc - A library to determine the location of someone on the Internet #
# #
# Copyright (C) 2020-2021 IPFire Development Team <info@ipfire.org> #
# Copyright (C) 2020-2022 IPFire Development Team <info@ipfire.org> #
# #
# This library is free software; you can redistribute it and/or #
# modify it under the terms of the GNU Lesser General Public #
......@@ -691,9 +691,9 @@ class CLI(object):
# How many octets do we need to add?
# (LACNIC does not seem to have a /8 or greater assigned, so the following should suffice.)
if ldigits == 2:
if ldigits == 1:
start_address = start_address[0] + ".0.0/" + start_address[1]
elif ldigits == 3:
elif ldigits == 2:
start_address = start_address[0] + ".0/" + start_address[1]
else:
log.warning("Could not recover IPv4 address from line in LACNIC DB format: %s" % line)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment