#17998: dynamic_dns_functions.sh:DDNS script wrongly detect ipv4 address start
with
10x.x.x.x
----------------------+----------------------------------
Reporter: eqsun | Owner: developers
Type: defect | Status: new
Priority: normal | Milestone: Chaos Calmer (trunk)
Component: packages | Version: Trunk
Keywords: ddns |
----------------------+----------------------------------
dynamic_dns_functions.sh
{{{
send_update() {
# $1 # IP to set at DDNS service provider
local __IP __URL __ANSWER __ERR
# verify given IP
[ $use_ipv6 -eq 0 ] && __IP=$(echo $1 | grep -v -E
"(^0|^10|^127|^172|^192)") # no private IPv4's
[ $use_ipv6 -eq 1 ] && __IP=$(echo $1 | grep "^[0-9a-eA-E]") #
no IPv6 addr starting with fxxx of with ":"
[ -z "$__IP" ] && critical_error "Invalid or no IP '$1' given"
}}}
It shall be:
{{{
grep -v -E "(^0|^10\.|^127|^172|^192)"
}}}
Otherwise the ip address starts with 100~109 will be treated as invalid.
--
Ticket URL: <https://dev.openwrt.org/ticket/17998>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets