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:26:01 -0400
commit6d028dc26c129ce1b0b25551142819772664f1e5 (patch)
tree9942d4f3015da50ff1ada37376063cc62f389e0c
parent5eb2c7c50f78d97db6fc935b59d4e1c3394602d2 (diff)
downloadpfsense-6d028dc26c129ce1b0b25551142819772664f1e5.zip
pfsense-6d028dc26c129ce1b0b25551142819772664f1e5.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
-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 43ce4ef..df5f159 100644
--- a/src/usr/local/www/interfaces_gif_edit.php
+++ b/src/usr/local/www/interfaces_gif_edit.php
@@ -61,10 +61,10 @@ if ($_POST['save']) {
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