|
Lines 78-84
Link Here
|
| 78 |
(new_network_number) k='NETWORK' ;; |
78 |
(new_network_number) k='NETWORK' ;; |
| 79 |
(new_broadcast_address) k='BROADCAST' ;; |
79 |
(new_broadcast_address) k='BROADCAST' ;; |
| 80 |
(new_interface_mtu) k='MTU' ;; |
80 |
(new_interface_mtu) k='MTU' ;; |
| 81 |
(new_rfc3442_classless_static_routes) |
81 |
(new_rfc3442_classless_static_routes_formatted) |
| 82 |
k='ROUTES' ;; |
82 |
k='ROUTES' ;; |
| 83 |
# (new_static_routes) k='ROUTES' ;; |
83 |
# (new_static_routes) k='ROUTES' ;; |
| 84 |
(new_routers) k='GATEWAYS' ;; |
84 |
(new_routers) k='GATEWAYS' ;; |
|
Lines 195-203
Link Here
|
| 195 |
} |
195 |
} |
| 196 |
get_ipv4_default_gw() |
196 |
get_ipv4_default_gw() |
| 197 |
{ |
197 |
{ |
| 198 |
if [ "x$new_rfc3442_classless_static_routes" != x ] ; then |
198 |
if [ "x$new_rfc3442_classless_static_routes_formatted" != x ] ; then |
| 199 |
local r route=() gw=() |
199 |
local r route=() gw=() |
| 200 |
for r in $new_rfc3442_classless_static_routes ; do |
200 |
for r in $new_rfc3442_classless_static_routes_formatted ; do |
| 201 |
route=(${r//,/ }) |
201 |
route=(${r//,/ }) |
| 202 |
case ${route[0]}/${route[1]} in |
202 |
case ${route[0]}/${route[1]} in |
| 203 |
0.0.0.0/0.0.0.0) |
203 |
0.0.0.0/0.0.0.0) |
|
Lines 213-222
Link Here
|
| 213 |
} |
213 |
} |
| 214 |
set_ipv4_routes() |
214 |
set_ipv4_routes() |
| 215 |
{ |
215 |
{ |
| 216 |
if [ "x$new_rfc3442_classless_static_routes" != x ] ; then |
216 |
if [ "x$new_rfc3442_classless_static_routes_formatted" != x ] ; then |
| 217 |
local r route=() |
217 |
local r route=() |
| 218 |
# TODO: multiple gw's to one dest as in $new_routers? |
218 |
# TODO: multiple gw's to one dest as in $new_routers? |
| 219 |
for r in $new_rfc3442_classless_static_routes ; do |
219 |
for r in $new_rfc3442_classless_static_routes_formatted ; do |
| 220 |
route=(${r//,/ }) |
220 |
route=(${r//,/ }) |
| 221 |
case ${route[0]}/${route[1]} in |
221 |
case ${route[0]}/${route[1]} in |
| 222 |
0.0.0.0/0.0.0.0) |
222 |
0.0.0.0/0.0.0.0) |
|
Lines 323-334
Link Here
|
| 323 |
'^[[:space:]]*DHCLIENT_SET_\(HOSTNAME\|DEFAULT_ROUTE\)=' \ |
323 |
'^[[:space:]]*DHCLIENT_SET_\(HOSTNAME\|DEFAULT_ROUTE\)=' \ |
| 324 |
"$SYSCONFIG_CFG_DIR/dhcp" 2>/dev/null` |
324 |
"$SYSCONFIG_CFG_DIR/dhcp" 2>/dev/null` |
| 325 |
fi |
325 |
fi |
| 326 |
if [ "x$new_rfc3442_classless_static_routes_raw" != x ] ; then |
326 |
if [ "x$new_rfc3442_classless_static_routes" != x ] ; then |
| 327 |
new_rfc3442_classless_static_routes=$( |
327 |
new_rfc3442_classless_static_routes_formatted=$( |
| 328 |
parse_ipv4_classless_routes $new_rfc3442_classless_static_routes_raw |
328 |
parse_ipv4_classless_routes $new_rfc3442_classless_static_routes |
| 329 |
) |
329 |
) |
| 330 |
else |
330 |
else |
| 331 |
unset new_rfc3442_classless_static_routes |
331 |
unset new_rfc3442_classless_static_routes_formatted |
| 332 |
fi |
332 |
fi |
| 333 |
if [ x$new_broadcast_address != x ] ; then |
333 |
if [ x$new_broadcast_address != x ] ; then |
| 334 |
new_broadcast_arg="brd $new_broadcast_address" |
334 |
new_broadcast_arg="brd $new_broadcast_address" |