Project

General

Profile

« Previous | Next » 

Revision 487d7d5e

Added by Marcos M about 1 year ago

Update the interface cache when configuring IPsec. Fix #15449

View differences:

src/etc/inc/interfaces.inc
1539 1539
				mwexec("/sbin/ifconfig {$ipsecif} mtu {$vtimtu}");
1540 1540
			}
1541 1541
		}
1542
		/* Add the VTI to the interface cache directly because calling 'get_interface_arr(true)' is expensive.
1543
		   See: https://redmine.pfsense.org/issues/15449 */
1544
		global $interface_arr_cache;
1545
		if (is_array($interface_arr_cache) && !in_array($ipsecif, $interface_arr_cache)) {
1546
			$interface_arr_cache[] = $ipsecif;
1547
		}
1542 1548
		system_routing_configure(convert_real_interface_to_friendly_interface_name($ipsecif));
1543 1549
	}
1544 1550
	return true;
src/etc/inc/util.inc
3106 3106
	}
3107 3107

  
3108 3108
	if (empty($params)) {
3109
		log_error("route_add_or_change: Invalid gateway {$gw} and/or " .
3110
		    "network interface {$iface}");
3109
		if (!empty($gw) && !empty($iface)) {
3110
			log_error("route_add_or_change: Invalid gateway ({$gw}) and network interface was not found ({$iface})");
3111
		} elseif (!empty($gw)) {
3112
			log_error("route_add_or_change: Invalid gateway ({$gw})");
3113
		} else {
3114
			log_error("route_add_or_change: Network interface was not found ({$iface})");
3115
		}
3111 3116
		return false;
3112 3117
	}
3113 3118

  

Also available in: Unified diff