mirror of
https://github.com/hak5/wifipineapple-openwrt.git
synced 2025-10-29 16:57:19 +00:00
allow ipv4 routes without gateway in configuration
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13714 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
3b50744bcc
commit
449da846f2
@ -27,7 +27,8 @@ add_route() {
|
||||
dest="${netmask:+-net "$target" netmask "$netmask"}"
|
||||
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() {
|
||||
@ -54,7 +55,8 @@ add_route6() {
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user