Project

General

Profile

Actions

Bug #16861

open

If a a gateway monitor IP is set, and then later the "dpinger_dont_add_static_route" option is enabled, the static route is NOT removed

Added by → luckman212 1 day ago. Updated about 20 hours ago.

Status:
Ready To Test
Priority:
Normal
Assignee:
Category:
Gateways
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Release Notes:
Default
Affected Plus Version:
26.03.1
Affected Architecture:

Description

I found this out the hard way today after a puzzling bit of DNS trouble when an LTE gateway with a monitor IP of 8.8.8.8 was powered off, resulting in all traffic to 8.8.8.8 blackholing since the GW had a static route bound to it.

I thought the fix would be to check the dpinger_dont_add_static_route checkbox for the gateway, but that seemed not to actually remove the route.

Digging in, I saw the problem in gwlb.inc (call to route_del() only fires if the monitor IP actually changes). Came up with this patch, which I tested successfully on my 6100 running 26.03.1:
https://gist.github.com/luckman212/11c0a4d6ae81f2613690294b5ff23ff0

It can be tested via System Patches using this URL
https://gist.githubusercontent.com/luckman212/11c0a4d6ae81f2613690294b5ff23ff0/raw/a8e5e3ad492223fe6a71fbc8e384a74add3b6ea0/gwlb.inc.patch

It also accounts for the case when the global option is changed from System → Advanced → Miscellaneous

Actions #1

Updated by → luckman212 1 day ago

I forgot to submit the Pull Request, I'll do that tomorrow. By the way, the diff had some whitespace changes (spaces to tabs) to make the indentation consistent. That's why it appears that the first changed block doesn't actually change anything.

Actions #2

Updated by → luckman212 about 24 hours ago

PR: https://github.com/pfsense/pfsense/pull/4754

I had to base it off the CE codebase since I don't have access to Plus, but the patch should apply to either.

Actions #3

Updated by Marcos M about 20 hours ago

  • Status changed from New to Ready To Test
  • Assignee set to Marcos M

The following should address the issue: Show

Actions

Also available in: Atom PDF