services: if ip detection fails don't leak private IPv4

PR: https://github.com/opnsense/core/issues/2368
This commit is contained in:
Franco Fichtner 2018-04-20 09:57:50 +02:00
parent 2b9ee69f10
commit 1547ecce67

View File

@ -1606,6 +1606,7 @@ function get_dyndns_ip($int, $ipver = 4)
$ip_address = trim($matches[1]);
} else {
log_error('Aborted IPv4 detection: ' . curl_error($ip_ch));
$ip_address = '';
}
curl_close($ip_ch);
if (!is_ipaddrv4($ip_address)) {