Project

General

Profile

« Previous | Next » 

Revision 507aa90a

Added by Renato Botelho over 12 years ago

Set (src|dst)mask to 128 for single IPv6 addresses. Fixes #2451

View differences:

usr/local/www/firewall_rules_edit.php
289 289
		$_POST['src'] = $_POST['srctype'];
290 290
		$_POST['srcmask'] = 0;
291 291
	} else if ($_POST['srctype'] == "single") {
292
		$_POST['srcmask'] = 32;
292
		if (is_ipaddrv6($_POST['src']))
293
			$_POST['srcmask'] = 128;
294
		else
295
			$_POST['srcmask'] = 32;
293 296
	}
294 297
	if (is_specialnet($_POST['dsttype'])) {
295 298
		$_POST['dst'] = $_POST['dsttype'];
296 299
		$_POST['dstmask'] = 0;
297 300
	}  else if ($_POST['dsttype'] == "single") {
298
		$_POST['dstmask'] = 32;
301
		if (is_ipaddrv6($_POST['dst']))
302
			$_POST['dstmask'] = 128;
303
		else
304
			$_POST['dstmask'] = 32;
299 305
	}
300 306

  
301 307
	$pconfig = $_POST;

Also available in: Unified diff