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.
Plus Target Version:
24.03
Release Notes:
Force Exclusion
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 to Feature #12092: Utilize new ``pfctl`` abilities to kill states added
- Status changed from New to Pull Request Review
- Blocked by Feature #12931: Retain knowledge of previous dynamic gateway IP address when interface is down added
- 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.
- 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.
- Related to Feature #12807: Clear Active Secondary WAN Connections added
- Plus Target Version changed from 22.09 to 22.11
- Plus Target Version changed from 22.11 to 23.01
- Plus Target Version changed from 23.01 to 23.05
Bump this forward again, not enough spare cycles this release to dig into it.
- Plus Target Version changed from 23.05 to 23.09
- Plus Target Version changed from 23.09 to 24.01
- Plus Target Version changed from 24.01 to 24.03
- 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
- Status changed from Pull Request Review to Feedback
- % Done changed from 0 to 100
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.
- Status changed from Feedback to Resolved
- Release Notes changed from Default to Force Exclusion
Also available in: Atom
PDF