Projet

Général

Profil

« Précédent | Suivant » 

Révision 4d076356

Ajouté par Ermal il y a environ 10 ans

Take care of interfaces that have no ip but might be part of the bridge as done for openvpn to avoid loops

Voir les différences:

etc/rc.newwanip
89 89
log_error("rc.newwanip: on (IP address: {$curwanip}) (interface: {$interface_descr}[{$interface}]) (real interface: {$interface_real}).");
90 90

  
91 91
/*
92
 * NOTE: Take care of openvpn and similar if you generate the event to reconfigure an interface.
92
 * NOTE: Take care of openvpn and no-ip interfaces or similar if you generate the event to reconfigure an interface.
93 93
 *      i.e. OpenVPN might be in tap mode and not have an ip.
94 94
 */
95
if (($curwanip == "0.0.0.0" || !is_ipaddr($curwanip)) && substr($interface_real, 0, 4) != "ovpn") {
96
	log_error("rc.newwanip: Failed to update {$interface} IP, restarting...");
97
	send_event("interface reconfigure {$interface}");
98
	exit;
95
if ($curwanip == "0.0.0.0" || !is_ipaddr($curwanip)) {
96
	if (substr($interface_real, 0, 4) != "ovpn") {
97
		if (!empty($config['interfaces'][$interface]['ipaddr'])) {
98
			log_error("rc.newwanip: Failed to update {$interface} IP, restarting...");
99
			send_event("interface reconfigure {$interface}");
100
			exit;
101
		}
102
	}
99 103
}
100 104

  
101 105
/* XXX: This really possible? */

Formats disponibles : Unified diff