From: Stefan Schantl Date: Wed, 25 Jan 2017 13:48:20 +0000 (+0100) Subject: ipv4-static: Remove routing information from databases when shutting down a zone. X-Git-Tag: 009~268 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f799b76daef72a92628288fda6257934d04162c0;p=network.git ipv4-static: Remove routing information from databases when shutting down a zone. 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 Signed-off-by: Michael Tremer --- diff --git a/src/hooks/configs/ipv4-static b/src/hooks/configs/ipv4-static index 72b748c7..cb002526 100644 --- a/src/hooks/configs/ipv4-static +++ b/src/hooks/configs/ipv4-static @@ -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}