Merge branch 'master' of git://git.ipfire.org/network
authorStefan Schantl <stefan.schantl@ipfire.org>
Sat, 5 Sep 2015 19:45:30 +0000 (21:45 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Sat, 5 Sep 2015 19:45:30 +0000 (21:45 +0200)
src/dhclient-script
src/functions/functions.dns
src/functions/functions.routing
src/hooks/zones/pppoe
src/network

index fd5c6f1..9d18dba 100644 (file)
@@ -91,7 +91,7 @@ case "${reason}" in
                        # Update nameservers if those have changed
                        if [[ "${old_dhcp6_name_servers}" != "${new_dhcp6_name_servers}" ]]; then
                                db_set "${interface}/ipv6/domain-name-servers" "${new_dhcp6_name_servers}"
-                               dns_generate_resolvconf
+                               dns_server_update
                        fi
 
                        # Update the lifetime if the address has not changed
@@ -247,8 +247,8 @@ case "${reason}" in
                                        routing_update ${interface} ipv4
                                        routing_default_update
 
-                                       # Update resolv.conf
-                                       dns_generate_resolvconf
+                                       # Update DNS configuration
+                                       dns_server_update
                                fi
                                ;;
                esac
index 5035468..a54feec 100644 (file)
@@ -225,6 +225,16 @@ dns_server_parse_line() {
        return ${EXIT_OK}
 }
 
+# This function should be called after any configuration
+# changes have been made to the DNS servers.
+dns_server_update() {
+       # Regenerate /etc/resolv.conf
+       dns_generate_resolvconf
+
+       # Restart radvd which propagates IPv6 DNS servers
+       radvd_update
+}
+
 # Update resolv.conf(5) when initializing the network.
 init_register dns_generate_resolvconf
 
index 6634610..707e026 100644 (file)
@@ -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
 }
 
index 790822a..865bbc5 100644 (file)
@@ -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
@@ -252,9 +255,7 @@ hook_status() {
 
                cli_print_fmt1 3 "IP address"  "$(db_get "${zone}/${proto}/local-ip-address")"
                cli_print_fmt1 3 "Gateway"     "$(db_get "${zone}/${proto}/remote-ip-address")"
-               cli_print_fmt1 3 "DNS servers" "$(db_get "${zone}/${proto}/dns")"
-               cli_space
-               cli_print_fmt1 3 "MAC-Remote"  "$(db_get "${zone}/${proto}/remote-address")"
+               cli_print_fmt1 3 "DNS servers" "$(db_get "${zone}/${proto}/domain-name-servers")"
                cli_space
        done
 
index 12e9742..4d23e50 100644 (file)
@@ -1245,8 +1245,7 @@ cli_dns_server() {
        esac
 
        # Update the local DNS configuration after changes have been made.
-       dns_generate_resolvconf
-       radvd_update
+       dns_server_update
 
        exit ${EXIT_OK}
 }