location-importer: Replace "UK" with "GB"
Commit Message
Apparently, LACNIC does not to proper input validation on supplied
country codes, so people can use "UK", while they probably mean "GB"
instead.
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
---
src/python/location-importer.in | 4 ++++
1 file changed, 4 insertions(+)
@@ -705,6 +705,10 @@ class CLI(object):
# ... but keep this list distinct...
continue
+ # When people set country codes to "UK", they actually mean "GB"
+ if val == "UK":
+ val = "GB"
+
inetnum[key].append(val)
# Skip empty objects