Skip to content
Snippets Groups Projects
Commit 51b28d44 authored by John Crispin's avatar John Crispin
Browse files

use default gateway for routes that have no gw specified, Signed off by: Brian J. Murrell

SVN-Revision: 11380
parent d7b697d4
No related branches found
No related tags found
No related merge requests found
...@@ -20,8 +20,7 @@ add_route() { ...@@ -20,8 +20,7 @@ add_route() {
return 1 return 1
} }
[ -n "$gateway" ] || { [ -n "$gateway" ] || {
echo "Missing gateway in route section $config" config_get gateway "$interface" gateway
return 1
} }
netmask="${netmask:-255.255.255.255}" netmask="${netmask:-255.255.255.255}"
...@@ -52,8 +51,7 @@ add_route6() { ...@@ -52,8 +51,7 @@ add_route6() {
return 1 return 1
} }
[ -n "$gateway" ] || { [ -n "$gateway" ] || {
echo "Missing gateway in route section $config" config_get gateway "$interface" gateway
return 1
} }
/sbin/route -A inet6 add $target gw "$gateway" ${dev:+dev "$dev"} ${metric:+ metric "$metric"} /sbin/route -A inet6 add $target gw "$gateway" ${dev:+dev "$dev"} ${metric:+ metric "$metric"}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment