diff options
author | Ermal <eri@pfsense.org> | 2010-05-10 09:59:38 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-05-10 09:59:38 +0000 |
commit | 1d002dc97a53a844f82764e535de05bda2d5f067 (patch) | |
tree | f24519c02f76513c96adcc1d46807e6a522c5169 /etc/inc/interfaces.inc | |
parent | cec4323f9731ce8ecea87c5c70652a7b28e75c7a (diff) | |
download | pfsense-1d002dc97a53a844f82764e535de05bda2d5f067.zip pfsense-1d002dc97a53a844f82764e535de05bda2d5f067.tar.gz |
Do not prepend empty lines to the first member this might trigger errors on code that relies on space to be a separator.
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r-- | etc/inc/interfaces.inc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index e523ebc..a4e14da 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -2776,6 +2776,7 @@ function link_ip_to_carp_interface($ip) { $carp_ints = ""; if (is_array($config['virtualip']['vip'])) { + $first = 0; foreach ($config['virtualip']['vip'] as $vip) { if ($vip['mode'] == "carp" || $vip['mode'] == "carpdev") { $carp_ip = $vip['subnet']; @@ -2783,8 +2784,12 @@ function link_ip_to_carp_interface($ip) { $carp_nw = gen_subnet($carp_ip, $carp_sn); if (ip_in_subnet($ip, "{$carp_nw}/{$carp_sn}")) { $carp_int = "vip{$vip['vhid']}"; - if (!stristr($carp_ints, $carp_int)) - $carp_ints .= " {$carp_int}"; + if (!stristr($carp_ints, $carp_int)) { + if ($first > 0) + $carp_ints .= " "; + $carp_ints .= "{$carp_int}"; + $first++; + } } } } |