monitoring-disabled gateway causes wrong tiered gateway in route-to
When there is a tier 1 gateway that's being monitored, and a tier 2 gateway with monitoring disabled, the system skips the tier 1 gateway when its status is online as if it were down. Take the attached config for instance, 192.168.15.1 is never the gateway used in the route-to in the ruleset, even when Status>Gateways shows it as up.
#2 Updated by Louis-David Perron almost 7 years ago
Hi Chris and Renato.
I have the exact same issue. My tier2 gateway monitoring is disabled. It's a PPP interface through a 3G stick.
I have 2.0.3, and I don't remember seeing this bug in 2.0.
Everytime the PPP reconnects, the route-to goes to ppp0, instead of em1 (my Tier1 interface).
I can reproduce the bug every time I execute rc.newwanip.
If I do a filter reload later, the route-to goes back to em1, like expected. So I believe that this is because filter_configure() is executed too rapidly after setup_gateways_monitor() in rc.newwanip.
To prove my point, I added a sleep, and can't reproduce the bug anymore:
/* reconfigure our gateway monitor /
sleep(5); // sleep(2); wasn't enough.
/ signal filter reload */
I'm running pfSense on Atom machines (with SSD), so it may be because of your CPU speed you can't reproduce this bug, or either this bug already been fixed in the snapshot.
Note, if both gateways has monitoring enabled, without my sleep, I get this in the logs. With the sleep, this message is gone:
May 16 14:12:17 chafw001 php: : Gateways status could not be determined, considering all as up/active.