]> git.ipfire.org Git - people/stevee/network.git/commitdiff
ipv4-static: Remove routing information from databases when shutting down a zone.
authorStefan Schantl <stefan.schantl@ipfire.org>
Wed, 25 Jan 2017 13:48:20 +0000 (14:48 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 26 Jan 2017 13:22:55 +0000 (13:22 +0000)
Otherwise the script will try to use this route again and crash because the address space
is not longer available.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/hooks/configs/ipv4-static

index 72b748c777054c232436981b0de765d813f75b3f..cb002526ab1f3c66f7f7db0627e1a1cd604187b9 100644 (file)
@@ -147,7 +147,10 @@ hook_down() {
                error "Zone '${zone}' doesn't exist."
                exit ${EXIT_ERROR}
        fi
-       
+
+       # Remove routing information from database.
+       db_delete "${zone}/ipv4"
+
        zone_config_settings_read "${zone}" "${config}"
 
        ip_address_del ${zone} ${ADDRESS}/${PREFIX}