Skip to content

Commit 99fcaa5

Browse files
author
Florian Schaal
committed
IPv6 - assign address (Fixes #3733)
1 parent b0fb62f commit 99fcaa5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/plugins-available/network_settings_plugin.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ function update($event_name, $data) {
110110
/*
111111
* don't insert the main-ip again!
112112
*/
113-
if ($rec['ip_address'] != $server_config['ip_address'])
113+
if ($rec['ip_address'] != $server_config['ip_address'] && filter_var($rec['ip_address'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4))
114114
{
115115
$ip_records[$n] = array(
116116
'id' => $n,
@@ -188,7 +188,7 @@ function update($event_name, $data) {
188188
/*
189189
* don't insert the main-ip again!
190190
*/
191-
if ($rec['ip_address'] != $server_config['ip_address'])
191+
if ($rec['ip_address'] != $server_config['ip_address'] && filter_var($rec['ip_address'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4))
192192
{
193193
$ip_records[$n] = array(
194194
'id' => $n,

0 commit comments

Comments
 (0)