Project

General

Profile

Actions

Feature #12931

closed

Retain knowledge of previous dynamic gateway IP address when interface is down

Added by Jim Pingle about 2 years ago. Updated about 2 years ago.

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

0%

Estimated time:
Plus Target Version:
22.05
Release Notes:
Default

Description

Our current methods for determining a gateway IP address only work while an interface with a dynamic address is up (e.g. DHCP, PPPoE, etc). There are cases in which we need to know what the previous gateway was before it was removed from the interface/routing table/etc. This already works properly for static IP address interfaces as the gateway address is present in the configuration, but that isn't possible for dynamic WANs.

One example of this need is to kill states for the previous gateway (See #12092) when an interface is down. It could also be useful for gateway monitoring status output.

With dynamic interfaces the gateway address is stored in temporary files (e.g. /tmp/<interface name>_router). This could be as simple as moving that file to /tmp/<interface name>_router.last instead of deleting it, and adding functions to read that when needed. We might need to be careful that the information isn't too stale. It's unlikely to be that simple in practice, given the different types of dynamic interfaces, but it's a starting point.

Nice to have, but can be pushed to a future release as needed.


Related issues

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

Actions
Blocks Bug #12942: Code to kill states for old gateway when reconnecting an interface is incorrectResolvedMarcos M

Actions
Actions

Also available in: Atom PDF