Project

General

Profile

Actions

Bug #12922

open

Classless static routes received on DHCP WAN can override chosen default gateway

Added by David Myers over 2 years ago. Updated 5 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
DHCP (IPv4)
Target version:
-
Start date:
Due date:
% Done:

0%

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

Description

Although I'm still running 2.5.2 I believe this bug is also in 2.6.0 based on a diff of the file in question.

I have multiple WANs, one of which is Starlink which sends DHCP Option 121 classless routes. My default gateway is explicitly set to a different interface but sometimes it changes to Starlink when the Starlink interface address changes. I believe there is an error here in pfSense-dhclient-script that causes the default route to change whether or not the gateway is currently set to be the default.

For example, here's a recent log message from when Starlink on igb3 got a new address:

Mar  9 05:23:16 router dhclient[61686]: New Classless Static Routes (igb3):  192.168.100.1/32 0.0.0.0 34.120.255.244/32 0.0.0.0 default 100.64.0.1

When I extract the code from pfSense-dhclient-script referenced above and create a test stub using the routes from the log message I get this output:
New Classless Static Routes (igb3): 192.168.100.1/32 0.0.0.0 34.120.255.244/32 0.0.0.0 default 100.64.0.1
route add 192.168.100.1/32 -iface igb3
route add 34.120.255.244/32 -iface igb3
route add default 100.64.0.1

I'm assuming that last route command is the problem. There is no test to confirm igb3 is the intended default gateway.

Actions

Also available in: Atom PDF