diff options
author | Renato Botelho <garga@FreeBSD.org> | 2014-12-11 16:43:19 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2014-12-11 16:46:48 -0200 |
commit | 470b14d8d676c342956c783bba4b352c91627626 (patch) | |
tree | 19a086de6ac4d79ef6fcf1d9a8ff69514bf2839d | |
parent | 79fabc8fac5f8c8444f8374748572040e96bee24 (diff) | |
download | pfsense-470b14d8d676c342956c783bba4b352c91627626.zip pfsense-470b14d8d676c342956c783bba4b352c91627626.tar.gz |
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.
-rwxr-xr-x | etc/rc.filter_synchronize | 4 |
1 files changed, 3 insertions, 1 deletions
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']); |