summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2017-02-23 10:41:50 +0545
committerjim-p <jimp@pfsense.org>2017-02-26 17:52:30 -0500
commit568b607a3509e84a448534c121ad08f98d0a05ee (patch)
treeb53321163aeeae906d1c45ff09aa12db8d457d37
parent8dbde62f220234c8fcfe472b97cdba606779bc22 (diff)
downloadpfsense-568b607a3509e84a448534c121ad08f98d0a05ee.zip
pfsense-568b607a3509e84a448534c121ad08f98d0a05ee.tar.gz
Fix #7299 and other stuff
As far as I can see, filter_generate_user_rule() is always supposed to be called with 'ipprotocol' set to 'inet' or 'inet6'. The cases of rules for both ('inet46') are handled by calling filter_generate_user_rule() twice, passing 'inet' then 'inet6'. So at this point, if 'ipprotocol' is blank, then it is from an old rule, and it [can|should|must] default to 'inet'. This would provide a generic fix for old rules that do not have 'ipprotocol' specified. The other thing that could be done is make some upgrade code that fills in 'ipprotocol' on old rules at upgrade.
-rw-r--r--src/etc/inc/filter.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/etc/inc/filter.inc b/src/etc/inc/filter.inc
index e003e33..b3e1a7f 100644
--- a/src/etc/inc/filter.inc
+++ b/src/etc/inc/filter.inc
@@ -2712,7 +2712,7 @@ function filter_generate_user_rule($rule) {
$aline['ipprotocol'] = "inet6";
break;
default:
- $aline['ipprotocol'] = "";
+ $aline['ipprotocol'] = "inet";
break;
}
OpenPOWER on IntegriCloud