]> git.ipfire.org Git - location/libloc.git/blobdiff - src/python/location-importer.in
location-importer: Skip everything with /0
[location/libloc.git] / src / python / location-importer.in
index 2d2a7ec554e778e074e14f39bae1cc02b68f8f31..36a525ee5bffbdba05196437844e8abe4eb8f97c 100644 (file)
@@ -590,6 +590,11 @@ class CLI(object):
                                                                log.warning("Invalid IP network: %s: %s" % (network, e))
                                                                continue
 
+                                                       # Prevent that we overwrite all networks
+                                                       if network.prefixlen == 0:
+                                                               log.warning("Skipping %s: You cannot overwrite default" % network)
+                                                               continue
+
                                                        self.db.execute("""
                                                                INSERT INTO network_overrides(
                                                                        network,