summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2017-08-22 12:26:01 -0400
committerjim-p <jimp@pfsense.org>2017-08-22 12:27:05 -0400
commitba7bc25c49f7f0478d1902a6b85ee4c1366d7d3f (patch)
treeb3b6f0fce119ea208f8e5eea5f6f292db870dfad
parent69f77f55dba10141db7240baffcf12b387c2f9a8 (diff)
downloadpfsense-ba7bc25c49f7f0478d1902a6b85ee4c1366d7d3f.zip
pfsense-ba7bc25c49f7f0478d1902a6b85ee4c1366d7d3f.tar.gz
When saving a GIF interface, do not allow the user to enter a subnet directly in the address box. The subnet is determined by the "GIF tunnel subnet" drop-down. Fixes #7789
(cherry picked from commit 6d028dc26c129ce1b0b25551142819772664f1e5) (cherry picked from commit c7fd6ec9b196b0d7c37d14dad13f745dab82420d) (cherry picked from commit df4107ac10793cacfa484e2856abafd2afac7d0d)
-rw-r--r--src/usr/local/www/interfaces_gif_edit.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/usr/local/www/interfaces_gif_edit.php b/src/usr/local/www/interfaces_gif_edit.php
index e0f8165..04d4cdf 100644
--- a/src/usr/local/www/interfaces_gif_edit.php
+++ b/src/usr/local/www/interfaces_gif_edit.php
@@ -98,10 +98,10 @@ if ($_POST) {
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
- if ((!is_ipaddr($_POST['tunnel-local-addr'])) ||
- (!is_ipaddr($_POST['tunnel-remote-addr'])) ||
- (!is_ipaddr($_POST['remote-addr']))) {
- $input_errors[] = gettext("The tunnel local and tunnel remote fields must have valid IP addresses.");
+ if ((!is_ipaddr($_POST['tunnel-local-addr']) || is_subnet($_POST['tunnel-local-addr'])) ||
+ (!is_ipaddr($_POST['tunnel-remote-addr']) || is_subnet($_POST['tunnel-remote-addr'])) ||
+ (!is_ipaddr($_POST['remote-addr']) || is_subnet($_POST['remote-addr']))) {
+ $input_errors[] = gettext("The tunnel local and tunnel remote fields must have valid IP addresses and must not contain CIDR masks or prefixes.");
}
if (!is_numericint($_POST['tunnel-remote-net'])) {
OpenPOWER on IntegriCloud