aboutsummaryrefslogtreecommitdiff
path: root/misc/openwrt/setup-routing.sh
diff options
context:
space:
mode:
Diffstat (limited to 'misc/openwrt/setup-routing.sh')
-rw-r--r--misc/openwrt/setup-routing.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/misc/openwrt/setup-routing.sh b/misc/openwrt/setup-routing.sh
index 97af514..b384541 100644
--- a/misc/openwrt/setup-routing.sh
+++ b/misc/openwrt/setup-routing.sh
@@ -15,11 +15,15 @@ case "$1" in
;;
ipset-add)
- ipset add "$2" "$3"
+ addr="$3"
+ addr="${addr/_/\/}"
+ ipset add "$2" "$addr"
;;
ipset-del)
- ipset del "$2" "$3"
+ addr="$3"
+ addr="${addr/_/\/}"s
+ ipset del "$2" "$addr"
;;
# ipset_list)