From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Schantl To: network@lists.ipfire.org Subject: [network] [PATCH 3/3] Only call radvd_update if a zone contains an IPv6. Date: Wed, 25 Jan 2017 14:48:21 +0100 Message-ID: <20170125134821.15442-3-stefan.schantl@ipfire.org> In-Reply-To: <20170125134821.15442-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6402478349053620290==" List-Id: --===============6402478349053620290== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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 --- src/functions/functions.routing | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/functions/functions.routing b/src/functions/functions.routing index c7aac09..4824f34 100644 --- a/src/functions/functions.routing +++ b/src/functions/functions.routing @@ -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 -- 2.9.3 --===============6402478349053620290==--