From 39cd231c7af4a0f2f129c688b5653e91e4d86649 Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Sat, 5 Sep 2015 21:21:14 +0200 Subject: [PATCH] pppoe: The remote MAC address should be protocol-independent Signed-off-by: Stefan Schantl Signed-off-by: Michael Tremer --- src/functions/functions.routing | 2 +- src/hooks/zones/pppoe | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/functions/functions.routing b/src/functions/functions.routing index 66346107..707e0268 100644 --- a/src/functions/functions.routing +++ b/src/functions/functions.routing @@ -130,7 +130,7 @@ routing_db_from_ppp() { # Save the MAC address of the remote DSLAM if isset PPP_MACREMOTE; then - db_set "${zone}/${proto}/remote-address" "${PPP_MACREMOTE,,}" + db_set "${zone}/remote-address" "${PPP_MACREMOTE,,}" fi } diff --git a/src/hooks/zones/pppoe b/src/hooks/zones/pppoe index 0bb475f8..865bbc59 100644 --- a/src/hooks/zones/pppoe +++ b/src/hooks/zones/pppoe @@ -232,6 +232,9 @@ hook_status() { # XXX display time since connection started cli_headline 2 "Point-to-Point-over-Ethernet protocol" + cli_print_fmt1 2 "MAC-Remote" "$(db_get "${zone}/remote-address")" + cli_space + local proto for proto in ${IP_SUPPORTED_PROTOCOLS}; do db_exists "${zone}/${proto}" || continue @@ -254,8 +257,6 @@ hook_status() { cli_print_fmt1 3 "Gateway" "$(db_get "${zone}/${proto}/remote-ip-address")" cli_print_fmt1 3 "DNS servers" "$(db_get "${zone}/${proto}/domain-name-servers")" cli_space - cli_print_fmt1 3 "MAC-Remote" "$(db_get "${zone}/${proto}/remote-address")" - cli_space done exit ${EXIT_OK} -- 2.39.2