]> git.ipfire.org Git - people/ms/network.git/commitdiff
ipv6-auto: prevent multiple configs for the same zone
authorJonatan Schlag <jonatan.schlag@ipfire.org>
Tue, 4 Jul 2017 15:46:10 +0000 (17:46 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 4 Jul 2017 21:16:59 +0000 (23:16 +0200)
It is senseless to configure the ipv6-auto hook
multiple times for a zone.

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/hooks/configs/ipv6-auto

index 44cef48dde27711aff98e20b6c27458e7b61189d..c36279757c86efeaea4ca3db3995e7f00df9c73d 100644 (file)
@@ -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=*)