Last active
June 1, 2026 13:51
-
-
Save luckman212/11c0a4d6ae81f2613690294b5ff23ff0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- a/src/etc/inc/gwlb.inc | |
| +++ b/src/etc/inc/gwlb.inc | |
| @@ -2419,19 +2419,19 @@ | |
| $a_gateway_item = config_get_path("gateways/gateway_item/{$realid}"); | |
| /* NOTE: If gateway ip is changed need to cleanup the old static interface route */ | |
| if ($gateway_settings['monitor'] != "dynamic" && | |
| - !empty($a_gateway_item) && | |
| - is_ipaddr($a_gateway_item['gateway']) && | |
| - $gateway['gateway'] != $a_gateway_item['gateway'] && | |
| - isset($a_gateway_item["nonlocalgateway"])) { | |
| + !empty($a_gateway_item) && | |
| + is_ipaddr($a_gateway_item['gateway']) && | |
| + $gateway['gateway'] != $a_gateway_item['gateway'] && | |
| + isset($a_gateway_item["nonlocalgateway"])) { | |
| route_del($a_gateway_item['gateway']); | |
| } | |
| - /* NOTE: If monitor ip is changed need to cleanup the old static route */ | |
| + /* NOTE: If monitor ip changed, or dpinger_dont_add_static_route is true (globally or per-gateway) remove the old static route */ | |
| if ($gateway_settings['monitor'] != "dynamic" && | |
| - !empty($a_gateway_item) && | |
| - is_ipaddr($a_gateway_item['monitor']) && | |
| - $gateway_settings['monitor'] != $a_gateway_item['monitor'] && | |
| - $gateway['gateway'] != $a_gateway_item['monitor']) { | |
| + !empty($a_gateway_item) && | |
| + is_ipaddr($a_gateway_item['monitor']) && | |
| + (isset($gateway['dpinger_dont_add_static_route']) || $skip_static_route || | |
| + ($gateway_settings['monitor'] != $a_gateway_item['monitor'] && $gateway['gateway'] != $a_gateway_item['monitor']))) { | |
| route_del($a_gateway_item['monitor']); | |
| } | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PR: pfsense/pfsense#4754