No internet connection after upgrade from April 20 snapshot to May 19
-
@piba
I've deleted this line and this fixes the problem with connection on boot, really. -
@w0w
I've discussed with jimp, and he didn't like removing the exit completely to avoid bringing the old previous race condition back. we agreed upon a specific 'ppp check' to avoid the exit. Can you put the exit back in, but apply this extra check instead.? That should still fix the issue.. does it.? :https://github.com/pfsense/pfsense/pull/3947/commits/627b0941889f4b19ad419ddfe01d329bef2c2bd6
-
@piba
Looks like with BOTH (gwlib.inc and rc.newwanip) fixes applied โ I now have internet connection. One thing is still need to be fixed โ after upgrade from previous version and after applying those patches I need also to select default gateway in drop-down list on system_gateways.php page.
If I restore old configuration on patched system the same thing happens also, I need manually select gateway on system_gateways.php via GUI, is it feature or bug? -
Yes the first link https://github.com/pfsense/pfsense/pull/3947 contains 3 fixes/commits, the 2 you refer to, and one that fixes the displaying of the IPv6 for a IPv4 gateway..
The gui 'none' selection is is still something to fix. Lets call that a 'unwanted feature' ;) . Ill probably work on that soon..
-
@piba
Thank you, let me know if you need further testing. -
@w0w
Thank you for testing and reporting back each time :).Can you try latest snapshot? Its build with these (slightly modified) fixes included.
p.s. not the 'none' selection yet though, still working on that.
-
@piba
I have tried this one:2.4.4-DEVELOPMENT (amd64) built on Sat Jun 23 01:57:55 EDT 2018 FreeBSD 11.2-RC3
I've found that internet not working with this snapshot on reboot, but both fixes are present.
I think it's modified line that was looked likeif (platform_booting() && strpos($interface_real, "ppp") !== 0) {
before,
and now it'sif (platform_booting() && in_array(substr($interface_real, 0, 3), array("ppp", "ppt", "l2t"))) {
because if I change it back, it works again.
-
@w0w
Ah crap, i forgot to do the inverse, '!'.if (platform_booting() && !in_array(substr($interface_real, 0, 3), array("ppp", "ppt", "l2t"))) {
sorry, thanks for testing!
new PR made: https://github.com/pfsense/pfsense/pull/3956
-
@piba This one is much better
It works! -
As expected, latest snapshot containing this PR boots normally.
-
@w0w
Thanks, added your confirmation to the redmine ticked so it can be closed. -
@piba
Please let me know when you need testing gui 'none' selection fix -
@w0w
The commit was merged, but not build yet. next snapshot should contain a new 'automatic' option which would be the default for the gateway selection, also a option to move gateways up/down on the list with checkboxes and anchor click. The option 'none' should now also actually be none.. I guess all of those things can use a little testing once it gets build .. -
@piba
Here is my test result. If I select "Automatic" option in GUI then everything looks OK, I have internet and default gateway, but when I try reboot the firewall, on next boot there is no internet and default gateway anymore, sounds familiar?
This easy to fix, just pressing "save" on system_gateways.php and "Apply changes", it immediately starts working and I see this line in log:/system_gateways.php: Default gateway setting Interface WAN_PPPOE Gateway as default.
There is no such/similar line during boot, so automatic selection does not trig for some reason.
How can I help to debug this? -
@w0w
Thanks again for testing. We seem to have hit catch22 issue here.'Automatic' selection takes the gateway 'status' into account which depends on dpinger, which depends on routes to the monitor-targets being configured before hand so to the monitor target will be using the correct gateway, which while configuring routes it also configures the default route which depends on the dpinger already running..
Hmm... This needs a bit more thought..
-
@piba
Maybe these questions sound silly, but anyway I'll ask
If we have a bunch of gateways, ex. multiple WANs, what this "automatic" selection is supposed to do generally?
When we have single gateway found on a system, then we can skip status check and just select it as "default", no? -
@w0w
Question are always good, well most of the time anyhow it makes me think again :).With multiple WANs its supposed to pick the first one thats 'up' as ordered in the gateway list and determined by the dpinger status. If that works properly with multiple wan's the same logic should also work with a single wan.. Making 'single wan' a special case makes the code more complicated imho so i tried to avoid that.. As for my previous statement about routes and dpinger needing them for the monitoring seems to have been wrong. So i think switching the order of these 2 actions in the newwanip scripts should fix the issue..
Made a new PR: https://github.com/pfsense/pfsense/pull/3962
It 'should' take care of dpinger not being available early enough. And if that fails it still takes the first configured gw and logs a message to the systemlog that it did that.. That 'should' not get logged though.. -
@piba
Applied this PR and voila, everything looks good now!
Automatic is active and default IPv4 route is picked up.Jul 8 19:48:58 php-fpm 334 /rc.newwanip: Gateway, none 'available' for inet6, use the first one configured. '' Jul 8 19:48:58 php-fpm 334 /rc.newwanip: Default gateway setting Interface WAN_PPPOE Gateway as default. Jul 8 19:48:58 php-fpm 334 /rc.newwanip: IP Address has changed, killing states on former IP Address x4.5x.x2.28.
All is as expected โ IPv6 is just not available, my ISP does not provide it and it is not enabled in firewall settings, so it's OK .
Thanks, PiBa! -
I am pleased to report that latest snapshot works "out of the box".
Good work! -
@w0w
Thanks for testing and reporting back :)