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:59 -0400
commitdf4107ac10793cacfa484e2856abafd2afac7d0d (patch)
treef93cb0facbd5c311dbfbf6745625db4d2b7f9d89
parent3b55caf9178fdfdedec68ff15265ec7a4f71a89a (diff)
downloadpfsense-df4107ac10793cacfa484e2856abafd2afac7d0d.zip
pfsense-df4107ac10793cacfa484e2856abafd2afac7d0d.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)
-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