X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/e8be3016c98c2e7d81755c4eae34ea3c60f4b3f9..271da7f4e93492f377c0fcf25def4591d60b9fbc:/package/firewall/files/lib/config.sh diff --git a/package/firewall/files/lib/config.sh b/package/firewall/files/lib/config.sh index 1c5e03096..996cef884 100644 --- a/package/firewall/files/lib/config.sh +++ b/package/firewall/files/lib/config.sh @@ -87,8 +87,8 @@ config_get_ipaddr() { local vers= case "$addr" in - *.*) vers=4 ;; - *:*) vers=6 ;; + *:*) vers=6; mask="${mask:-128}" ;; + *.*) vers=4; mask="${mask:-32}" ;; esac export ${NO_EXPORT:+-n} -- "${varn}=${addr}"