Project

General

Profile

Actions

Bug #12942

open

Code to kill states for old gateway when reconnecting an interface is incorrect

Added by Jim Pingle 3 months ago. Updated 3 months ago.

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

0%

Estimated time:
Plus Target Version:
22.09
Release Notes:
Default
Affected Version:
Affected Architecture:

Description

There are a few places where we may want to clear states using an old gateway when it's no longer valid, and there is some (ineffective) code in some of these places now.

The places this is being done are:

  • /etc/inc/interfaces.inc in interface_bring_down() where it sets $old_router (should be here, but old/bad code was removed a while ago, though the unused code setting $old_router remains.
  • /usr/local/sbin/pfSense-dhclient-script where it sets OLD_ROUTER
  • /usr/local/sbin/ppp-linkup where it sets OLD_ROUTER

These should be using pfctl -k gateway -k <address> either instead of or in addition to the commands already present.


Related issues

Related to Feature #12092: Utilize new ``pfctl`` abilities to kill statesClosedJim Pingle06/29/2021

Actions
Related to Feature #12807: Clear Active Secondary WAN ConnectionsDuplicate

Actions
Blocked by Feature #12931: Retain knowledge of previous dynamic gateway IP address when interface is downResolvedJim Pingle

Actions
Actions #1

Updated by Jim Pingle 3 months ago

  • Related to Feature #12092: Utilize new ``pfctl`` abilities to kill states added
Actions #2

Updated by Jim Pingle 3 months ago

  • Status changed from New to Pull Request Review

MR: https://gitlab.netgate.com/pfSense/pfSense/-/merge_requests/673

Might be too aggressive, also might need to cover more interface types.

Relies on some changes in https://gitlab.netgate.com/pfSense/pfSense/-/merge_requests/672 so that should be merged first.

Actions #3

Updated by Jim Pingle 3 months ago

  • Blocked by Feature #12931: Retain knowledge of previous dynamic gateway IP address when interface is down added
Actions #4

Updated by Jim Pingle 3 months ago

  • Status changed from Pull Request Review to In Progress

While this does work, it can be harsh and should be made optional if possible. A global option similar to the option to kill states for down gateways is likely sufficient, though a per-gateway or per-interface option would be even better. This only makes sense for dynamic interfaces/gateways, not static. Static interfaces retain their address when they go down while dynamic interfaces such as DHCP, PPP, etc. do not.

Actions #5

Updated by Jim Pingle 3 months ago

  • Status changed from In Progress to New
  • Target version changed from 2.7.0 to CE-Next
  • Plus Target Version changed from 22.05 to 22.09

Back burner this for now, can revisit soon. The current gateway behavior appears to be sufficient, this might be nice to have but not worth the effort yet.

Actions #6

Updated by Viktor Gurov 3 months ago

  • Related to Feature #12807: Clear Active Secondary WAN Connections added
Actions

Also available in: Atom PDF