Project

General

Profile

« Previous | Next » 

Revision beb7cd97

Added by Renato Botelho almost 12 years ago

Use ipprotocol to check gateway protocol, this fix a issue that allow to set more than one default gateway when it's dynamic

View differences:

usr/local/www/system_gateways_edit.php
391 391
			$i = 0;
392 392
			/* remove the default gateway bits for all gateways with the same address family */
393 393
			foreach($a_gateway_item as $gw) {
394
				if(is_ipaddrv4($gateway['gateway']) && is_ipaddrv4($gw['gateway'])) {
395
					unset($config['gateways']['gateway_item'][$i]['defaultgw']);
396
					if ($gw['interface'] != $_POST['interface'] && $gw['defaultgw'])
397
						$reloadif = $gw['interface'];
398
				}
399
				if(is_ipaddrv6($gateway['gateway']) && is_ipaddrv6($gw['gateway'])) {
394
				if ($gateway['ipprotocol'] == $gw['ipprotocol']) {
400 395
					unset($config['gateways']['gateway_item'][$i]['defaultgw']);
401 396
					if ($gw['interface'] != $_POST['interface'] && $gw['defaultgw'])
402 397
						$reloadif = $gw['interface'];

Also available in: Unified diff