Project

General

Profile

« Previous | Next » 

Revision 701f5caa

Added by Chris Buechler almost 10 years ago

Can't use continue here as it continues the foreach, which skips the "ipfw zone" command, breaking CP for any system that doesn't have VIPs defined.

View differences:

src/etc/inc/captiveportal.inc
500 500
			$cpipm = get_interface_ip($cpifgrp);
501 501
			if (is_ipaddr($cpipm)) {
502 502
				$cpips[] = $cpipm;
503
				if (!is_array($config['virtualip']) || !is_array($config['virtualip']['vip'])) {
504
					continue;
505
				}
506
				foreach ($config['virtualip']['vip'] as $vip) {
507
					if (($vip['interface'] == $cpifgrp) && (($vip['mode'] == "carp") || ($vip['mode'] == "ipalias"))) {
508
						$cpips[] = $vip['subnet'];
503
				if (is_array($config['virtualip']) || is_array($config['virtualip']['vip'])) {
504
					foreach ($config['virtualip']['vip'] as $vip) {
505
						if (($vip['interface'] == $cpifgrp) && (($vip['mode'] == "carp") || ($vip['mode'] == "ipalias"))) {
506
							$cpips[] = $vip['subnet'];
507
						}
509 508
					}
510 509
				}
511 510
			}

Also available in: Unified diff