Révision 31dbd433
Ajouté par Ermal il y a environ 10 ans
etc/rc.newwanip | ||
---|---|---|
92 | 92 |
log_error("rc.newwanip: on (IP address: {$curwanip}) (interface: {$interface_descr}[{$interface}]) (real interface: {$interface_real})."); |
93 | 93 |
|
94 | 94 |
/* |
95 |
* NOTE: Take care of openvpn and similar if you generate the event to reconfigure an interface.
|
|
95 |
* NOTE: Take care of openvpn, no-ip or similar interfaces if you generate the event to reconfigure an interface.
|
|
96 | 96 |
* i.e. OpenVPN might be in tap mode and not have an ip. |
97 | 97 |
*/ |
98 |
if (($curwanip == "0.0.0.0" || !is_ipaddr($curwanip)) && substr($interface_real, 0, 4) != "ovpn") { |
|
99 |
log_error("rc.newwanip: Failed to update {$interface} IP, restarting..."); |
|
100 |
send_event("interface reconfigure {$interface}"); |
|
101 |
return; |
|
98 |
if ($curwanip == "0.0.0.0" || !is_ipaddr($curwanip)) { |
|
99 |
if (substr($interface_real, 0, 4) != "ovpn") { |
|
100 |
if (!empty($config['interfaces'][$interface]['ipaddr'])) { |
|
101 |
log_error("rc.newwanip: Failed to update {$interface} IP, restarting..."); |
|
102 |
send_event("interface reconfigure {$interface}"); |
|
103 |
return; |
|
104 |
} |
|
105 |
} |
|
102 | 106 |
} |
103 | 107 |
|
104 | 108 |
/* XXX: This really possible? */ |
Formats disponibles : Unified diff
Take care of interfaces that have no ip but might be part of the bridge as done for openvpn to avoid loops