Project

General

Profile

Actions

Bug #12282

closed

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

Added by Viktor Gurov over 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Viktor Gurov
Category:
Gateways
Target version:
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

Actions #2

Updated by Jim Pingle over 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
Actions #3

Updated by Viktor Gurov over 3 years ago

  • Status changed from Pull Request Review to Feedback

Merged

Actions #4

Updated by Jim Pingle over 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.

Actions #5

Updated by Jim Pingle about 3 years ago

  • Plus Target Version changed from 21.09 to 22.01
Actions #6

Updated by Jim Pingle almost 3 years ago

  • Status changed from Feedback to Closed
Actions

Also available in: Atom PDF