SHA256
1
0
forked from pool/dhcp
Marius Tomaschewski 2010-08-10 08:05:28 +00:00 committed by Git OBS Bridge
parent 69130efed3
commit 31ec3f5c01
3 changed files with 19 additions and 11 deletions

View File

@ -78,7 +78,7 @@ netconfig_modify() {
(new_network_number) k='NETWORK' ;;
(new_broadcast_address) k='BROADCAST' ;;
(new_interface_mtu) k='MTU' ;;
(new_rfc3442_classless_static_routes)
(new_rfc3442_classless_static_routes_formatted)
k='ROUTES' ;;
# (new_static_routes) k='ROUTES' ;;
(new_routers) k='GATEWAYS' ;;
@ -195,9 +195,9 @@ set_ipv4_route()
}
get_ipv4_default_gw()
{
if [ "x$new_rfc3442_classless_static_routes" != x ] ; then
if [ "x$new_rfc3442_classless_static_routes_formatted" != x ] ; then
local r route=() gw=()
for r in $new_rfc3442_classless_static_routes ; do
for r in $new_rfc3442_classless_static_routes_formatted ; do
route=(${r//,/ })
case ${route[0]}/${route[1]} in
0.0.0.0/0.0.0.0)
@ -213,10 +213,10 @@ get_ipv4_default_gw()
}
set_ipv4_routes()
{
if [ "x$new_rfc3442_classless_static_routes" != x ] ; then
if [ "x$new_rfc3442_classless_static_routes_formatted" != x ] ; then
local r route=()
# TODO: multiple gw's to one dest as in $new_routers?
for r in $new_rfc3442_classless_static_routes ; do
for r in $new_rfc3442_classless_static_routes_formatted ; do
route=(${r//,/ })
case ${route[0]}/${route[1]} in
0.0.0.0/0.0.0.0)
@ -323,12 +323,12 @@ dhclient)
'^[[:space:]]*DHCLIENT_SET_\(HOSTNAME\|DEFAULT_ROUTE\)=' \
"$SYSCONFIG_CFG_DIR/dhcp" 2>/dev/null`
fi
if [ "x$new_rfc3442_classless_static_routes_raw" != x ] ; then
new_rfc3442_classless_static_routes=$(
parse_ipv4_classless_routes $new_rfc3442_classless_static_routes_raw
if [ "x$new_rfc3442_classless_static_routes" != x ] ; then
new_rfc3442_classless_static_routes_formatted=$(
parse_ipv4_classless_routes $new_rfc3442_classless_static_routes
)
else
unset new_rfc3442_classless_static_routes
unset new_rfc3442_classless_static_routes_formatted
fi
if [ x$new_broadcast_address != x ] ; then
new_broadcast_arg="brd $new_broadcast_address"

View File

@ -30,11 +30,11 @@
#
# define classless static route option
#
option rfc3442-classless-static-routes_raw code 121 = array of unsigned integer 8;
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
# Request several well known/usefull dhcp options.
request subnet-mask, broadcast-address, routers,
rfc3442-classless-static-routes_raw,
rfc3442-classless-static-routes,
interface-mtu, host-name, domain-name,
domain-name-servers, nis-domain, nis-servers,
nds-context, nds-servers, nds-tree-name,

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Wed Aug 4 12:52:03 UTC 2010 - mt@suse.de
- Renamed rfc3442-classless-static-routes_raw in /etc/dhclient.conf
to rfc3442-classless-static-routes for compatibility with the
NetworkManager making use of /etc/dhclient.conf now and adopted
/sbin/dhclient-script (bnc#625770).
-------------------------------------------------------------------
Tue Jul 27 13:31:09 UTC 2010 - mt@suse.de