Fix susbstr-substr typo

I just got this error again on 14 Apr 2014 2.2 snapshot. I can see the fix in 2.1 branch. I could have sworn it got fixed in Master also, but I can't see it. So here is the fix for Master.
This commit is contained in:
Phil Davis 2014-04-15 07:06:13 -07:00
parent d35b367a3c
commit 45f4d7628a

View File

@ -95,7 +95,7 @@ log_error("rc.newwanip: on (IP address: {$curwanip}) (interface: {$interface_des
* NOTE: Take care of openvpn and similar if you generate the event to reconfigure an interface.
* i.e. OpenVPN might be in tap mode and not have an ip.
*/
if (($curwanip == "0.0.0.0" || !is_ipaddr($curwanip)) && susbstr($interface_real, 0, 4) != "ovpn") {
if (($curwanip == "0.0.0.0" || !is_ipaddr($curwanip)) && substr($interface_real, 0, 4) != "ovpn") {
log_error("rc.newwanip: Failed to update {$interface} IP, restarting...");
send_event("interface reconfigure {$interface}");
return;