diff options
author | jim-p <jimp@pfsense.org> | 2017-03-16 16:44:55 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2017-03-16 16:44:55 -0400 |
commit | 31b1f1e14d9fceed8bece4679275965ece495fd8 (patch) | |
tree | 3571be20c69702a1e11c7a3cc6f2266047844461 /src/etc/inc/vslb.inc | |
parent | 59fada5c1fb57f2896caae895c70dd10ef5d02da (diff) | |
download | pfsense-31b1f1e14d9fceed8bece4679275965ece495fd8.zip pfsense-31b1f1e14d9fceed8bece4679275965ece495fd8.tar.gz |
Don't process empty anchors as it could lead to flushing more than intended when cleaning up after relayd. Fixes #7396
Diffstat (limited to 'src/etc/inc/vslb.inc')
-rw-r--r-- | src/etc/inc/vslb.inc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/etc/inc/vslb.inc b/src/etc/inc/vslb.inc index 7d59cb1..7c759de 100644 --- a/src/etc/inc/vslb.inc +++ b/src/etc/inc/vslb.inc @@ -485,6 +485,10 @@ function get_lb_anchors() { function cleanup_lb_anchor($anchorname = "*") { $lbanchors = get_lb_anchors(); foreach ($lbanchors as $lba) { + /* Skip empty/blank results */ + if (empty($lba)) { + continue; + } if (($anchorname == "*") || ($lba == "relayd/{$anchorname}")) { /* Flush both the NAT and the Table for the anchor, so it will be completely removed by pf. */ mwexec("/sbin/pfctl -a " . escapeshellarg($lba) . " -F nat"); |