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:46:09 -0400 |
commit | 0d40b2cb3402458335d4191a9f5a0e46f21871bf (patch) | |
tree | 3ce9a6ea1cf7bfcd22e19aa94050968ae0bb20ad | |
parent | 32e75b43f2911e888fe7b6beaf56b3540660ab4a (diff) | |
download | pfsense-0d40b2cb3402458335d4191a9f5a0e46f21871bf.zip pfsense-0d40b2cb3402458335d4191a9f5a0e46f21871bf.tar.gz |
Don't process empty anchors as it could lead to flushing more than intended when cleaning up after relayd. Fixes #7396
-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 c95e890..7c1ff17 100644 --- a/src/etc/inc/vslb.inc +++ b/src/etc/inc/vslb.inc @@ -517,6 +517,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"); |