-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Allow specific gateways to be excluded from default gateway switching #3827
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Rebase of my old PR pfsense#3609
|
Didn't want to add too much to this PR so close to 2.4 but, here's a closely-related commit 3bbcaef that also adds the ability to disable notifications (smtp, growl) on a per-gateway basis. |
Since fixup_default_gateway() gets called frequently, the logs were getting spammed. This change makes it only log the debug events if the global debug flag is set.
|
@luckman212 - It's far too late for a change like this to make 2.4. That said, after 2.4.0 we're planning on using the method in PR #3781 instead for a more complete way to control default gateway switching. It's a more intuitive and comprehensive method of managing the default switching behavior. |
|
Original PR was causing too much log spam. 6d2f615 cleans that up. |
|
@jim-p I was talking to @PiBa-NL on IRC and he said that his PR was still a ways out. This one is fairly simple, so I thought it might squeak through. I understand if 2.4.0 is off the table, but should I retarget master, or just kill this altogether? PiBa's patch could be a long ways off and this is still useful as-is. |
|
@luckman212 iirc i told my PR wasn't going to get into 2.4.0 as it was marked "post 2.4.0".. I do intend to get it into 2.4.1 shortly after 2.4release becomes available and the bigger pullrequests likely get handled again. And while it does need a little more work as it currently is, thats mostly the automatic configuration upgrade and removing of the old checkboxes.. your PR might have been merged into 2.4.0 if i didnt make a similar one.. im not sure, but i do hope that 2.4.1 will provide us both the flexibility we seek in this subject, until 2.4.1 release (or if your going to run beta's) you will have to patch your pfSense box with either your own patch, or mine if you really need this behavior.. in the mean time did do a few other pullrequests that i 'hoped' might still have made it into 2.4.0 and as such i havent finished the changes to #3781.. anyhow i hope my intentions are clear, sorry if i gave you a different idea before.. ill try and finish it before 2.4.0 gets released.. im getting the feeling that might happen really really soon.. (basically 2 issues left on redmine that need work.) |
|
In the meantime, I rebased and have a new unified patch that rolls the customizable default gw switching + independent email notification toggles together and merges clean with 2.4.2/master commit: 01b57b4 for anyone who wants to use it until PiBa's patch is ready. |
|
@luckman212 can you please send it against branch |
|
Sure, I thought we were waiting for PiBa's patch... but I already had a commit targeting |
|
Superseded by #3861 |
Rebase/update of my old PR #3609 -- trying again!
This commit adds a feature to allow you to optionally prevent gateways from being elected as default during Gateway Switching operations in a multi-WAN environment when the "Enable default gateway switching" option is enabled. Some possible use cases:
This only controls the default gateway of the firewall itself; it does not change the behavior of Policy Based Routing.
Changes/new features
-adds a
no_defgw_switchflag to gateway config that will cause it to be excluded from the default gateway selection process-indicate this setting (as an icon) in System > Routing > Gateways
-updated help text for Default gateway switching in System > Advanced > Misc to better describe the usage of that feature
-adds some debug logging for gw change events
-setting a gateway as default on the edit page automatically toggles/hides this option, as having both enabled would not be sane
Files changed:
/etc/inc/gwlb.inc
/usr/local/www/system_advanced_misc.php
/usr/local/www/system_gateways.php
/usr/local/www/system_gateways_edit.php