summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-03-15 10:46:22 +0100
committerFelix Fietkau <nbd@openwrt.org>2012-03-15 10:46:22 +0100
commit15bf3d441fd429f2b6ff18cc0c351ac8d3dd655f (patch)
treee5b52e2ff73221eac5c29860c0d58e9606319fc3
parent2cc1190666ddfb2dc2a5fbf4febe7a4579d0c2f5 (diff)
shell: support routes without gateway
-rwxr-xr-xdummy/netifd-proto.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/dummy/netifd-proto.sh b/dummy/netifd-proto.sh
index 69aa27d..7482a83 100755
--- a/dummy/netifd-proto.sh
+++ b/dummy/netifd-proto.sh
@@ -127,7 +127,7 @@ _proto_push_route() {
json_add_object ""
json_add_string target "$target"
json_add_string netmask "$mask"
- json_add_string gateway "$gw"
+ [ -n "$gw" ] && json_add_string gateway "$gw"
json_close_object
}