Project

General

Profile

Feature #2834 ยป skew.patch

Robert Middleswarth, 01/24/2015 07:59 PM

View differences:

etc/rc.filter_synchronize
59 59
		    (strpos($section['interface'], '_vip') === FALSE) &&
60 60
		    (strpos($section['interface'], 'lo0') === FALSE))
61 61
			continue;
62
		if ($section['advskew'] <> "") {
62
		if (($section['advskew'] <> "") && ($section['dontadvskew'] <> "ignore")) {
63 63
			$section_val = intval($section['advskew']);
64 64
			$section_val=$section_val+100;
65 65
			if ($section_val > 254)
usr/local/www/firewall_virtual_ip_edit.php
86 86
	$pconfig['mode'] = $a_vip[$id]['mode'];
87 87
	$pconfig['vhid'] = $a_vip[$id]['vhid'];
88 88
	$pconfig['advskew'] = $a_vip[$id]['advskew'];
89
	$pconfig['dontadvskew'] = $a_vip[$id]['dontadvskew'];
89 90
	$pconfig['advbase'] = $a_vip[$id]['advbase'];
90 91
	$pconfig['password'] = $a_vip[$id]['password'];
91 92
	$pconfig['range'] = $a_vip[$id]['range'];
......
244 245
			$vipent['vhid'] = $_POST['vhid'];
245 246
			$vipent['vhid'] = $_POST['uinqid'];
246 247
			$vipent['advskew'] = $_POST['advskew'];
248
			$vipent['dontadvskew'] = $_POST['dontadvskew'];
247 249
			$vipent['advbase'] = $_POST['advbase'];
248 250
			$vipent['password'] = $_POST['password'];
249 251
		}
......
325 327
	document.iform.password.disabled = $mode != "carp";
326 328
	document.iform.vhid.disabled     = $mode != "carp";
327 329
	document.iform.advskew.disabled  = $mode != "carp";
330
	document.iform.dontadvskew.disabled  = $mode != "carp";
328 331
	document.iform.advbase.disabled  = $mode != "carp";
329 332
	document.iform.type.disabled     = $mode in {"carp":1,"ipalias":1};
330 333
	
......
496 499
                      			</option>
497 500
                            <?php endfor; ?>
498 501
                      		</select>
502
				Disable sync skew: <input type="checkbox" id='dontadvskew' name='dontadvskew' value="ignore"> <i id="typenote"><?=gettext("Do not disable unless you know what you are doing?");?></i>
499 503
				<br /><br />
500 504
				<?=gettext("The frequency that this machine will advertise.  0 means usually master. Otherwise the lowest combination of both values in the cluster determines the master.");?>
501 505
				  </td>
usr/local/www/widgets/widgets/carp_status.widget.php
52 52
			$netmask = $carp['subnet_bits'];
53 53
			$vhid = $carp['vhid'];
54 54
			$advskew = $carp['advskew'];
55
			$dontadvskew = $carp['dontadvskew'];
55 56
			$status = get_carp_interface_status("_vip{$carp['uniqid']}");
56 57
?>
57 58
<tr>
usr/local/www/xmlrpc.php
212 212
		if (is_array($config['virtualip']['vip'])) {
213 213
			foreach ($config['virtualip']['vip'] as $vipindex => $vip) {
214 214
				if ($vip['mode'] == "carp")
215
					$oldvips["{$vip['interface']}_vip{$vip['vhid']}"] = "{$vip['password']}{$vip['advskew']}{$vip['subnet']}{$vip['subnet_bits']}{$vip['advbase']}";
215
					$oldvips["{$vip['interface']}_vip{$vip['vhid']}"] = "{$vip['password']}{$vip['advskew']}{$vip['subnet']}{$vip['subnet_bits']}{$vip['advbase']}{$vip['dontadvskew']}";
216 216
				else if ($vip['mode'] == "ipalias" && (substr($vip['interface'], 0, 4) == '_vip') || strpos($vip['interface'], "lo0")))
217 217
					$oldvips[$vip['subnet']] = "{$vip['interface']}{$vip['subnet']}{$vip['subnet_bits']}";
218 218
				else if (($vip['mode'] == "ipalias" || $vip['mode'] == 'proxyarp') && !(substr($vip['interface'], 0, 4) == '_vip') || strpos($vip['interface'], "lo0")))
......
247 247
		$anyproxyarp = false;
248 248
		foreach ($config['virtualip']['vip'] as $vip) {
249 249
			if ($vip['mode'] == "carp" && isset($oldvips["{$vip['interface']}_vip{$vip['vhid']}"])) {
250
				if ($oldvips["{$vip['interface']}_vip{$vip['vhid']}"] == "{$vip['password']}{$vip['advskew']}{$vip['subnet']}{$vip['subnet_bits']}{$vip['advbase']}") {
250
				if ($oldvips["{$vip['interface']}_vip{$vip['vhid']}"] == "{$vip['password']}{$vip['advskew']}{$vip['subnet']}{$vip['subnet_bits']}{$vip['advbase']}{$vip['dontadvskew']}") {
251 251
					if (does_vip_exist($vip)) {
252 252
						unset($oldvips["{$vip['interface']}_vip{$vip['vhid']}"]);
253 253
						continue; // Skip reconfiguring this vips since nothing has changed.
    (1-1/1)