From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonatan Schlag To: network@lists.ipfire.org Subject: [PATCH 6/7] ipv6-auto: prevent multiple configs for the same zone Date: Tue, 04 Jul 2017 17:46:10 +0200 Message-ID: <1499183171-24236-6-git-send-email-jonatan.schlag@ipfire.org> In-Reply-To: <1499183171-24236-1-git-send-email-jonatan.schlag@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3945685739449894611==" List-Id: --===============3945685739449894611== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit It is senseless to configure the ipv6-auto hook multiple times for a zone. Signed-off-by: Jonatan Schlag --- src/hooks/configs/ipv6-auto | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/hooks/configs/ipv6-auto b/src/hooks/configs/ipv6-auto index 44cef48..c362797 100644 --- a/src/hooks/configs/ipv6-auto +++ b/src/hooks/configs/ipv6-auto @@ -34,6 +34,11 @@ hook_new() { local zone="${1}" shift + if zone_config_hook_is_configured ${zone} "ipv6-auto"; then + log ERROR "You can configure the ipv6-auto hook only once for a zone" + return ${EXIT_ERROR} + fi + while read arg; do case "${arg}" in --privacy-extensions=*) -- 2.6.3 --===============3945685739449894611==--