Project

General

Profile

Bug #335 ยป guess_interface_from_ip_bridges_fix.patch

Erik Fonnesbeck, 02/05/2010 09:05 PM

View differences:

etc/inc/interfaces.inc
2442 2442
		return false;
2443 2443
	}
2444 2444
	/* create a route table we can search */
2445
	exec("netstat -rn", $output, $ret);
2445
	exec("netstat -rnW", $output, $ret);
2446 2446
	foreach($output as $line) {
2447 2447
		if(preg_match("/^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\/[0-9]+[ ]+link[#]/", $line)) {
2448 2448
			$fields = preg_split("/[ ]+/", $line);
2449 2449
			if(ip_in_subnet($ipaddress, $fields[0])) {
2450
				return $fields[5];
2450
				return $fields[6];
2451 2451
			}
2452 2452
		}
2453 2453
	}
    (1-1/1)