Project

General

Profile

Actions

Bug #12942

closed

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

Added by Jim Pingle over 2 years ago. Updated 9 months ago.

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

100%

Estimated time:
Plus Target Version:
24.03
Release Notes:
Force Exclusion
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 over 2 years ago

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

Updated by Jim Pingle over 2 years 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 over 2 years ago

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

Updated by Jim Pingle over 2 years 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 over 2 years 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 over 2 years ago

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

Updated by Jim Pingle over 2 years ago

  • Plus Target Version changed from 22.09 to 22.11
Actions #8

Updated by Jim Pingle about 2 years ago

  • Plus Target Version changed from 22.11 to 23.01
Actions #9

Updated by Jim Pingle almost 2 years ago

  • Plus Target Version changed from 23.01 to 23.05

Bump this forward again, not enough spare cycles this release to dig into it.

Actions #10

Updated by Jim Pingle over 1 year ago

  • Plus Target Version changed from 23.05 to 23.09
Actions #11

Updated by Jim Pingle over 1 year ago

  • Plus Target Version changed from 23.09 to 24.01
Actions #12

Updated by Jim Pingle about 1 year ago

  • Plus Target Version changed from 24.01 to 24.03
Actions #13

Updated by Marcos M 10 months ago

  • Status changed from New to Pull Request Review
  • Assignee changed from Jim Pingle to Marcos M
  • Target version changed from CE-Next to 2.8.0
Actions #14

Updated by Marcos M 10 months ago

  • Status changed from Pull Request Review to Feedback
  • % Done changed from 0 to 100
Actions #15

Updated by Kris Phillips 10 months ago

Tested bringing up and down a second gateway with state killing enabled on lower priority gateways and state killing for down gateways. Up and down events properly killed states as expected for both scenarios.

Seems to work perfectly, but someone else should test this as well since this is a very large change.

Actions #16

Updated by Marcos M 9 months ago

  • Status changed from Feedback to Resolved
  • Release Notes changed from Default to Force Exclusion
Actions

Also available in: Atom PDF