Correct route lookup code

This commit is contained in:
Seth Mos 2008-11-06 15:38:21 +00:00
parent 004909faa6
commit cfec5019af

View File

@ -242,7 +242,7 @@ function system_routing_configure() {
}
while (!feof($fd)) {
$oldrt = fgets($fd);
if (preg_match("/{$oldrt}/", $route_str))
if (($oldrt) && (stristr($route_str, $oldrt)))
mwexec("/sbin/route delete " . escapeshellarg($oldrt));
}
fclose($fd);