Project

General

Profile

« Previous | Next » 

Revision 5d8e8c9d

Added by Jim Pingle over 12 years ago

Exclude the VPN peer from routes so as to not break connectivity to the actual VPN peer if a route includes its IP.

View differences:

etc/inc/openvpn.inc
525 525
		if ($settings['local_network']) {
526 526
			list($ip, $mask) = explode('/', $settings['local_network']);
527 527
			$mask = gen_subnet_mask($mask);
528
			$conf .= "push \"route remote_host 255.255.255.255 net_gateway\"\n";
528 529
			$conf .= "push \"route $ip $mask\"\n";
529 530
		}
530 531
		if ($settings['local_networkv6']) {
......
615 616
	if ((substr($settings['mode'], 0, 3) == "p2p") && is_subnet($settings['remote_network'])) {
616 617
		list($ip, $mask) = explode('/', $settings['remote_network']);
617 618
		$mask = gen_subnet_mask($mask);
619
		$conf .= "route remote_host 255.255.255.255 net_gateway\n";
618 620
		$conf .= "route $ip $mask\n";
619 621
	}
620 622
	// Add a remote network route if set, and only for p2p modes.

Also available in: Unified diff