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:43:19 -0200 |
commit | 11bdc638ef87c94d239113cbac9e5f59bc8b74da (patch) | |
tree | d1cc1b4fc6121ccd4dfb394ba16a5f635e967345 /etc | |
parent | 986fd3d9a70bd92e2138372147e338e24f774730 (diff) | |
download | pfsense-11bdc638ef87c94d239113cbac9e5f59bc8b74da.zip pfsense-11bdc638ef87c94d239113cbac9e5f59bc8b74da.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.
Diffstat (limited to 'etc')
-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']); |