Project

General

Profile

« Previous | Next » 

Revision 587c2d55

Added by Jim Pingle over 6 years ago

Validate submitted interfaces. Issue #9294

(cherry picked from commit 5cc7d21dc08be6c65a2bf7f8f4481dc13f4ae115)

View differences:

src/usr/local/www/interfaces_assign.php
251 251
	build a list of port-to-interface mappings in portifmap */
252 252
	foreach ($_POST as $ifname => $ifport) {
253 253
		if (($ifname == 'lan') || ($ifname == 'wan') || (substr($ifname, 0, 3) == 'opt')) {
254
			$portifmap[$ifport][] = strtoupper($ifname);
254
			if (array_key_exists($ifport, $portlist)) {
255
				$portifmap[$ifport][] = strtoupper($ifname);
256
			} else {
257
				$input_errors[] = sprintf(gettext('Cannot set port %1$s because the submitted interface does not exist.'), $ifname);
258
			}
255 259
		}
256 260
	}
257 261

  

Also available in: Unified diff