]> git.ipfire.org Git - people/ms/network.git/commitdiff
dhcp-client: Fix routing configuration.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 10 Jun 2012 19:26:57 +0000 (19:26 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 10 Jun 2012 19:26:57 +0000 (19:26 +0000)
dhclient-script

index e56c096cfd7a2ed68cff7ec83d9374fdc779ae3f..651a630ef8975ba695c06f58283e2e6ab1aa3ed4 100644 (file)
@@ -10,8 +10,6 @@ assert isset reason
 
 assert device_exists ${interface}
 
-# XXX LOAD ZONE CONFIGURATION
-
 basename="$(basename $0)"
 log DEBUG "${basename} called for interface=${interface} reason=${reason}"
 
@@ -97,11 +95,12 @@ case "${reason}" in
                                        # Save configuration
                                        routing_db_set ${interface} ipv4 type "ipv4-dhcp"
                                        routing_db_set ${interface} ipv4 local-ip-address "${new_ip_address}/${new_prefix}"
-                                       routing_db_set ${interface} ipv4 remote-ip-address "${new_router}"
+                                       routing_db_set ${interface} ipv4 remote-ip-address "${new_routers}"
                                        routing_db_set ${interface} ipv4 active 1
 
                                        # Update the routing tables.
                                        routing_update ${interface} ipv4
+                                       routing_default_update
                                fi
                                ;;
                esac
@@ -115,6 +114,9 @@ case "${reason}" in
                        ipv4_flush_device ${interface}
                fi
 
+               routing_db_remove ${interface} ipv4
+               routing_default_update
+
                exit 0
                ;;
 esac