Project

General

Profile

« Previous | Next » 

Revision 01383bd5

Added by Ermal Luçi over 16 years ago

Cosmetic change to use the available function instead of replicating the process here.

View differences:

etc/inc/pfsense-utils.inc
3413 3413
	$gwcfg = $config['interfaces'][$interface];
3414 3414
        if (is_ipaddr($gwcfg['gateway'])) 
3415 3415
        	$gw = $gwcfg['gateway'];
3416
        else if ($gwcfg['gateway'] <> "") {
3417
        	if (is_array($config['gateways']['gateway_item']))
3418
                	foreach($config['gateways']['gateway_item'] as $gateway) {
3419
                                if($gateway['name'] == $gwcfg['gateway']) {
3420
                                        $gw = $gateway['gateway'];
3421
                        		break;
3422
                		}
3423
        		}
3424
        } 
3416
        else if (!empty($gwcfg['gateway']))
3417
		$gw = lookup_gateway_ip_by_name($gwcfg['gateway']);
3425 3418
	
3426 3419
	// for dynamic interfaces we handle them through the $interface_router file.
3427 3420
	if (!is_ipaddr($gw)) {
......
3789 3782
		foreach($config['gateways']['gateway_item'] as $gateway) {
3790 3783
			if($gateway['name'] == $name) {
3791 3784
				$gatewayip = $gateway['gateway'];
3792
				$interfacegw = $gateway['interface'];
3785
				//$interfacegw = $gateway['interface'];
3793 3786
				return($gatewayip);
3794 3787
			}
3795 3788
		}
......
3999 3992
	return $length;
4000 3993
}
4001 3994

  
4002
?>
3995
?>

Also available in: Unified diff