Project

General

Profile

« Previous | Next » 

Revision c9f69485

Added by Luiz Souza over 6 years ago

Do not call interfaces_vlan_configure() every time an interface is edited in GUI.

This is just necessary when a parent interface is changed and we have to propagate the changes to all clones (MTU, FLAGS and others).

Add a logic to detect when a parent interface is changed and only then call interfaces_vlan_configure().

Ticket #9115

(cherry picked from commit 433a8e71f3b68c39634e11b62d8bf3d9e8ec878c)

View differences:

src/usr/local/www/interfaces.php
430 430
		unlink_if_exists("{$g['tmp_path']}/config.cache");
431 431
		clear_subsystem_dirty('interfaces');
432 432

  
433
		$vlan_redo = false;
433 434
		if (file_exists("{$g['tmp_path']}/.interfaces.apply")) {
434 435
			$toapplylist = unserialize(file_get_contents("{$g['tmp_path']}/.interfaces.apply"));
435 436
			foreach ($toapplylist as $ifapply => $ifcfgo) {
......
452 453
						services_dhcpd_configure();
453 454
					}
454 455
				}
455
				/*
456
				 * If the parent interface has changed above, the VLANs needs to be
457
				 * redone.
458
				 */
459
				interfaces_vlan_configure();
456
				if (interface_has_clones(get_real_interface($ifapply))) {
457
					$vlan_redo = true;
458
				}
460 459
			}
461 460
		}
461

  
462
		/*
463
		 * If the parent interface has changed above, the VLANs needs to be
464
		 * redone.
465
		 */
466
		if ($vlan_redo) {
467
			interfaces_vlan_configure();
468
		}
469

  
462 470
		/* restart snmp so that it binds to correct address */
463 471
		$retval |= services_snmpd_configure();
464 472

  

Also available in: Unified diff