Révision e912bfae
Ajouté par Renato Botelho il y a presque 10 ans
etc/inc/interfaces.inc | ||
---|---|---|
1314 | 1314 |
services_dhcpd_configure('inet6', $track6); |
1315 | 1315 |
} |
1316 | 1316 |
|
1317 |
$old_router = ''; |
|
1317 | 1318 |
if (file_exists("{$g['tmp_path']}/{$realif}_router")) |
1318 | 1319 |
$old_router = trim(file_get_contents("{$g['tmp_path']}/{$realif}_router")); |
1319 | 1320 |
// log_error("Checking for old router states: {$g['tmp_path']}/{$realif}_router = {$old_router}"); |
1320 | 1321 |
if (!empty($old_router)) { |
1321 | 1322 |
log_error("Clearing states to old gateway {$old_router}."); |
1322 |
mwexec("/sbin/pfctl -i " . escapeshellarg($realif) . " -Fs -G {$old_router}");
|
|
1323 |
mwexec("/sbin/pfctl -i " . escapeshellarg($realif) . " -Fs"); |
|
1323 | 1324 |
} |
1324 | 1325 |
|
1325 | 1326 |
/* remove interface up file if it exists */ |
Formats disponibles : Unified diff
Fix #3700 and other syntax issues:
- Remove
G parameter from pfctl since it doesn't exist anymore
Initialize $old_router- Fix sh syntax on variable assign, it couldn't have space before =
- Simplify logic
- Avoid flush states twice, if it was done on IP change, don't do it
again if router also has changed