]> git.ipfire.org Git - network.git/commitdiff
pppoe: Fix exception when bringing down the zone
authorStefan Schantl <stefan.schantl@ipfire.org>
Tue, 2 Jul 2013 05:38:04 +0000 (07:38 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Tue, 2 Jul 2013 05:38:04 +0000 (07:38 +0200)
The port setting was changed and hook_down() did not
reflect these changes accordingly.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
src/hooks/zones/pppoe

index b4bb660169f2fd1ba7e70387f392581473896c8c..790822a88d19a8b65532c54096632b8366362cb2 100644 (file)
@@ -138,8 +138,11 @@ hook_down() {
        pppd_stop ${zone}
 
        # Bring down the port.
-       log DEBUG "Bringing down port '${PORT}'."
-       port_down ${PORT}
+       local port=$(__hook_get_port "${zone}")
+       if isset port; then
+               log DEBUG "Bringing down port '${port}'"
+               port_down "${port}"
+       fi
 
        exit ${EXIT_OK}
 }