Révision ff3da5db
Ajouté par Renato Botelho il y a presque 10 ans
etc/inc/interfaces.inc | ||
---|---|---|
1322 | 1322 |
services_dhcpd_configure('inet6', $track6); |
1323 | 1323 |
} |
1324 | 1324 |
|
1325 |
$old_router = ''; |
|
1325 | 1326 |
if (file_exists("{$g['tmp_path']}/{$realif}_router")) |
1326 | 1327 |
$old_router = trim(file_get_contents("{$g['tmp_path']}/{$realif}_router")); |
1327 | 1328 |
// log_error("Checking for old router states: {$g['tmp_path']}/{$realif}_router = {$old_router}"); |
1328 | 1329 |
if (!empty($old_router)) { |
1329 | 1330 |
log_error("Clearing states to old gateway {$old_router}."); |
1330 |
mwexec("/sbin/pfctl -i " . escapeshellarg($realif) . " -Fs -G {$old_router}");
|
|
1331 |
mwexec("/sbin/pfctl -i " . escapeshellarg($realif) . " -Fs"); |
|
1331 | 1332 |
} |
1332 | 1333 |
|
1333 | 1334 |
/* 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