Project

General

Profile

« Previous | Next » 

Revision c55e4580

Added by Chris Buechler about 15 years ago

only match with a space behind the IP, otherwise 10.0.0.6 CARP IP may match against interface IP 10.0.0.60, and show incorrect info on the CARP status page

View differences:

etc/inc/interfaces.inc
2765 2765
		foreach ($config['virtualip']['vip'] as $vip) {
2766 2766
			if ($vip['mode'] == "carp" || $vip['mode'] == "carpdev") {
2767 2767
				$carp_ip = get_interface_ip($vip['interface']);
2768
				$if = `ifconfig | grep '$ip' -B1 | head -n1 | cut -d: -f1`;
2768
				$if = `ifconfig | grep '$ip ' -B1 | head -n1 | cut -d: -f1`;
2769 2769
				if ($if)
2770 2770
					return $if;
2771 2771
			}
......
3210 3210
		unlink_if_exists($cron_file);
3211 3211
}
3212 3212

  
3213
?>
3213
?>
usr/local/www/carp_status.php
107 107
			<p>
108 108
			<table class="tabcont sortable" width="100%" border="0" cellpadding="6" cellspacing="0">
109 109
				<tr>
110
					<td class="listhdrr"><b><center>Carp Interface</center></b></td>
110
					<td class="listhdrr"><b><center>CARP Interface</center></b></td>
111 111
					<td class="listhdrr"><b><center>Virtual IP</center></b></td>
112 112
					<td class="listhdrr"><b><center>Status</center></b></td>
113 113
				</tr>

Also available in: Unified diff