From 470b14d8d676c342956c783bba4b352c91627626 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Thu, 11 Dec 2014 16:43:19 -0200 Subject: Fix #4099: - When interface is 'lo0', strpos returns 0, that is erroneously considered false (boolean) on the test. Be more strict on strpos return to avoid skiping lo0 ip aliases during sync. --- etc/rc.filter_synchronize | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/etc/rc.filter_synchronize b/etc/rc.filter_synchronize index c6fbf99..b3d8755 100755 --- a/etc/rc.filter_synchronize +++ b/etc/rc.filter_synchronize @@ -55,7 +55,9 @@ function backup_vip_config_section() { $temp = array(); $temp['vip'] = array(); foreach($config['virtualip']['vip'] as $section) { - if (($section['mode'] == 'proxyarp' || $section['mode'] == 'ipalias') && !(strpos($section['interface'], '_vip') || strpos($section['interface'], 'lo0'))) + if (($section['mode'] == 'proxyarp' || $section['mode'] == 'ipalias') && + (strpos($section['interface'], '_vip') === FALSE) && + (strpos($section['interface'], 'lo0') === FALSE)) continue; if ($section['advskew'] <> "") { $section_val = intval($section['advskew']); -- cgit v1.1