Project

General

Profile

« Previous | Next » 

Revision 6d028dc2

Added by Jim Pingle almost 8 years ago

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

View differences:

src/usr/local/www/interfaces_gif_edit.php
61 61

  
62 62
	do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
63 63

  
64
	if ((!is_ipaddr($_POST['tunnel-local-addr'])) ||
65
	    (!is_ipaddr($_POST['tunnel-remote-addr'])) ||
66
	    (!is_ipaddr($_POST['remote-addr']))) {
67
		$input_errors[] = gettext("The tunnel local and tunnel remote fields must have valid IP addresses.");
64
	if ((!is_ipaddr($_POST['tunnel-local-addr']) || is_subnet($_POST['tunnel-local-addr'])) ||
65
	    (!is_ipaddr($_POST['tunnel-remote-addr']) || is_subnet($_POST['tunnel-remote-addr'])) ||
66
	    (!is_ipaddr($_POST['remote-addr']) || is_subnet($_POST['remote-addr']))) {
67
		$input_errors[] = gettext("The tunnel local and tunnel remote fields must have valid IP addresses and must not contain CIDR masks or prefixes.");
68 68
	}
69 69

  
70 70
	if (!is_numericint($_POST['tunnel-remote-net'])) {

Also available in: Unified diff