Modify

Opened 3 years ago

Closed 3 years ago

#17998 closed defect (fixed)

dynamic_dns_functions.sh:DDNS script wrongly detect ipv4 address start with 10x.x.x.x

Reported by: eqsun Owned by: developers
Priority: normal Milestone: Chaos Calmer 15.05
Component: packages Version: Trunk
Keywords: ddns Cc:

Description

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.

Attachments (0)

Change History (2)

comment:1 Changed 3 years ago by chris5560

Thanks to eqsun for report and fix.
Implemented in PKG_RELEASE 4.
Pull request created.

please mark this ticket as closed
Christian

comment:2 Changed 3 years ago by nbd

  • Resolution set to fixed
  • Status changed from new to closed

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.