Actions
Bug #12282
closedDefault IPv4 gateway may be set to IPv6 gateway value in certain cases
Start date:
Due date:
% Done:
0%
Estimated time:
Plus Target Version:
22.01
Release Notes:
Default
Affected Version:
2.5.2
Affected Architecture:
Description
setdefaultgateway() may set IPv6 gateway as a IPv4 gateway in some cases,
see https://github.com/pfsense/pfsense/blob/master/src/etc/inc/gwlb.inc#L1209-L1220:
if ($currentdefaultgwip != $gw['gateway']) {
log_error("Default gateway setting {$gw['descr']} as default.");
if ($ipprotocol == 'inet') {
array_map('unlink', glob("{$g['tmp_path']}/*_defaultgw", GLOB_BRACE));
} else {
array_map('unlink', glob("{$g['tmp_path']}/*_defaultgwv6", GLOB_BRACE));
}
$defaultif = get_real_interface($gw['interface']);
if ($defaultif) {
@file_put_contents("{$g['tmp_path']}/{$defaultif}_defaultgw", $gw['gateway']);
}
-- it always puts the new default gateway value (no matter of protocol family) to {$defaultif}_defaultgw
Updated by Viktor Gurov about 3 years ago
Updated by Jim Pingle about 3 years ago
- Status changed from New to Pull Request Review
- Assignee set to Viktor Gurov
- Target version set to 2.6.0
- Plus Target Version set to 21.09
Updated by Viktor Gurov about 3 years ago
- Status changed from Pull Request Review to Feedback
Merged
Updated by Jim Pingle about 3 years ago
- Subject changed from Default IPv4 gateway may be set to IPv6 gateway value in case of to Default IPv4 gateway may be set to IPv6 gateway value in certain cases
Updating subject for release notes.
Updated by Jim Pingle about 3 years ago
- Plus Target Version changed from 21.09 to 22.01
Actions