Project

General

Profile

Actions

Bug #12282

open

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

Added by Viktor Gurov 5 months ago. Updated 3 months ago.

Status:
Feedback
Priority:
Normal
Assignee:
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 5 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 5 months ago

  • Status changed from Pull Request Review to Feedback

Merged

Actions #4

Updated by Jim Pingle 5 months 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 3 months ago

  • Plus Target Version changed from 21.09 to 22.01
Actions

Also available in: Atom PDF