allow ipv4 routes without gateway in configuration
SVN-Revision: 13714
This commit is contained in:
parent
6afa1b4c50
commit
1cdaa2d3dc
1 changed files with 4 additions and 2 deletions
|
@ -27,7 +27,8 @@ add_route() {
|
||||||
dest="${netmask:+-net "$target" netmask "$netmask"}"
|
dest="${netmask:+-net "$target" netmask "$netmask"}"
|
||||||
dest="${dest:--host "$target"}"
|
dest="${dest:--host "$target"}"
|
||||||
|
|
||||||
/sbin/route add $dest gw "$gateway" ${dev:+dev "$dev"} ${metric:+ metric "$metric"}
|
/sbin/route add $dest ${gateway:+gw "$gateway"} \
|
||||||
|
${dev:+dev "$dev"} ${metric:+ metric "$metric"}
|
||||||
}
|
}
|
||||||
|
|
||||||
add_route6() {
|
add_route6() {
|
||||||
|
@ -54,7 +55,8 @@ add_route6() {
|
||||||
config_get gateway "$interface" gateway
|
config_get gateway "$interface" gateway
|
||||||
}
|
}
|
||||||
|
|
||||||
/sbin/route -A inet6 add $target ${gateway:+gw "$gateway"} ${dev:+dev "$dev"} ${metric:+ metric "$metric"}
|
/sbin/route -A inet6 add $target ${gateway:+gw "$gateway"} \
|
||||||
|
${dev:+dev "$dev"} ${metric:+ metric "$metric"}
|
||||||
}
|
}
|
||||||
|
|
||||||
case "$ACTION" in
|
case "$ACTION" in
|
||||||
|
|
Loading…
Reference in a new issue