Project

General

Profile

« Previous | Next » 

Revision 186ab4ea

Added by Jim Pingle over 11 years ago

Don't flush interface cache on each call of the function when looping through all gateways.

View differences:

etc/inc/gwlb.inc
367 367
	$found_defaultv4 = 0;
368 368
	$found_defaultv6 = 0;
369 369

  
370
	// Ensure the interface cache is up to date first
371
	$interfaces = get_interface_arr(true);
370 372
	$interfaces_v4 = array();
371 373
	$interfaces_v6 = array();
372 374

  
......
422 424

  
423 425
			/* special treatment for tunnel interfaces */
424 426
			if ($gateway['ipprotocol'] == "inet6") {
425
				$gateway['interface'] = get_real_interface($gateway['interface'], "inet6");
427
				$gateway['interface'] = get_real_interface($gateway['interface'], "inet6", false, false);
426 428
				$interfaces_v6[$gateway['friendlyiface']] = $gateway['friendlyiface'];
427 429
			} else {
428
				$gateway['interface'] = get_real_interface($gateway['interface']);
430
				$gateway['interface'] = get_real_interface($gateway['interface'], "all", false, false);
429 431
				$interfaces_v4[$gateway['friendlyiface']] = $gateway['friendlyiface'];
430 432
			}
431 433

  

Also available in: Unified diff