Project

General

Profile

« Previous | Next » 

Revision 6e4c8e92

Added by Ermal Luçi about 10 years ago

Fixes #4633 Enable carp packets to flow on the first carp interface creation. This is needed only when the system is booted up without any carp vip configured

View differences:

usr/local/www/firewall_virtual_ip.php
63 63
	$pconfig = $_POST;
64 64

  
65 65
	if ($_POST['apply']) {
66
		$check_carp = false;
66 67
		if (file_exists("{$g['tmp_path']}/.firewall_virtual_ip.apply")) {
67 68
                        $toapplylist = unserialize(file_get_contents("{$g['tmp_path']}/.firewall_virtual_ip.apply"));
68 69
			foreach ($toapplylist as $vid => $ovip) {
......
77 78
                        			interface_proxyarp_configure($a_vip[$vid]['interface']);
78 79
                        			break;
79 80
                			case "carp":
81
						$check_carp = true;
80 82
                        			interface_carp_configure($a_vip[$vid]);
81 83
						break;
82 84
                			default:
......
86 88
        		}
87 89
			@unlink("{$g['tmp_path']}/.firewall_virtual_ip.apply");
88 90
		}
91
		/* Before changing check #4633 */
92
                if ($check_carp === true && !get_carp_status())
93
                        set_single_sysctl("net.inet.carp.allow", "1");
94

  
89 95
		$retval = 0;
90 96
		$retval |= filter_configure();
91 97
		$savemsg = get_std_save_message($retval);

Also available in: Unified diff