]> git.ipfire.org Git - people/stevee/network.git/commitdiff
Only call radvd_update if a zone contains an IPv6.
authorStefan Schantl <stefan.schantl@ipfire.org>
Wed, 25 Jan 2017 13:48:21 +0000 (14:48 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 26 Jan 2017 13:24:16 +0000 (13:24 +0000)
On systems which lacks any IPv6 configured zone, radvd would be
started with an empty configuration file and crashes which will
brick the system startup and results in a frozen system.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/functions/functions.routing

index c7aac094f11cdca2c4d88abc8a65df4816666425..4824f3454f62ca7856893b20d21f5e7b5e0c98b1 100644 (file)
@@ -81,7 +81,9 @@ routing_default_update() {
                routes=$(echo ${routes})
 
                # Reload radvd configuration
-               [[ "${proto}" = "ipv6" ]] && radvd_update
+               if [[ "${proto}" = "ipv6" ]] && db_exists "${zone}/ipv6"; then
+                       radvd_update
+               fi
 
                # Remove all default routes.
                if [ -z "${routes}" ]; then