Project

General

Profile

Actions

Bug #12282

open

Default IPv4 gateway may be set to IPv6 gateway value in certain cases

Added by Viktor Gurov about 2 months ago. Updated about 1 month ago.

Status:
Feedback
Priority:
Normal
Assignee:
Category:
Gateways
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
21.09
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

Actions #2

Updated by Jim Pingle about 2 months 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
Actions #3

Updated by Viktor Gurov about 1 month ago

  • Status changed from Pull Request Review to Feedback

Merged

Actions #4

Updated by Jim Pingle about 1 month 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.

Actions

Also available in: Atom PDF