summaryrefslogtreecommitdiffstats
path: root/src/etc/inc/vslb.inc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2017-03-16 16:44:55 -0400
committerjim-p <jimp@pfsense.org>2017-03-16 16:44:55 -0400
commit31b1f1e14d9fceed8bece4679275965ece495fd8 (patch)
tree3571be20c69702a1e11c7a3cc6f2266047844461 /src/etc/inc/vslb.inc
parent59fada5c1fb57f2896caae895c70dd10ef5d02da (diff)
downloadpfsense-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.inc4
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");
OpenPOWER on IntegriCloud