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 22 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

Also available in: Atom PDF