Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    No internet connection after upgrade from April 20 snapshot to May 19

    2.4 Development Snapshots
    4
    50
    12.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      PiBa @w0w
      last edited by

      Yep thats the 2 lines right there..

      Jun 10 19:50:00 	php-fpm 	334 	/rc.newwanip: rc.newwanip: on (IP address: 84.52.**.200) (interface: WAN[wan]) (real interface: pppoe0).
      Jun 10 19:50:00 	php-fpm 	334 	/rc.newwanip: rc.newwanip: Info: starting on pppoe0.
      

      So indeed in your case it is 'aborting' that script before its done running.
      Seems like this 'exit' is supposed to be avoiding a race condition where its actually causing one...:
      https://github.com/pfsense/pfsense/blob/d84eec807d6216cfbc073438ce57e01f1c52a2f4/src/etc/rc.newwanip#L192

      @jimp any insights on what would be the right order to call things?

      • initialize PPPOE-client while booting
      • initialize routes and packages and rules and stuff after PPPOE gets connected
      • finish the rc.newwanip to configure routes and other things that depends on the newly assigned wan-ip..
      • finish booting..

      I think it was previously working because every call to return_gateway_groups_array() would again try and fix the gateways.. and eventually one did catch.. Now the return_gateway_groups_array() most of the time skips these actions as fixing the gateway should not happen as a 'side-effect' of 'requesting information'.. But that does seem to cause this problem..

      1 Reply Last reply Reply Quote 0
      • P
        PiBa
        last edited by

        Perhaps the fix could be as simple as removing that 'exit' from the rc.newwanip .? (in addition to the PR made)

        w0wW 1 Reply Last reply Reply Quote 0
        • w0wW
          w0w @PiBa
          last edited by

          @piba
          I've deleted this line and this fixes the problem with connection on boot, really.

          P 1 Reply Last reply Reply Quote 0
          • P
            PiBa @w0w
            last edited by

            @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

            w0wW 1 Reply Last reply Reply Quote 0
            • w0wW
              w0w @PiBa
              last edited by

              @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? โ˜บ

              1 Reply Last reply Reply Quote 0
              • P
                PiBa
                last edited by

                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..

                w0wW 1 Reply Last reply Reply Quote 1
                • w0wW
                  w0w @PiBa
                  last edited by

                  @piba
                  Thank you, let me know if you need further testing.

                  P 1 Reply Last reply Reply Quote 0
                  • P
                    PiBa @w0w
                    last edited by

                    @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.

                    w0wW 1 Reply Last reply Reply Quote 0
                    • w0wW
                      w0w @PiBa
                      last edited by

                      @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 like

                      if (platform_booting() && strpos($interface_real, "ppp") !== 0) {
                      

                      before,
                      and now it's

                      if (platform_booting() && in_array(substr($interface_real, 0, 3), array("ppp", "ppt", "l2t"))) {
                      

                      because if I change it back, it works again.

                      P 1 Reply Last reply Reply Quote 1
                      • P
                        PiBa @w0w
                        last edited by PiBa

                        @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

                        w0wW 1 Reply Last reply Reply Quote 0
                        • w0wW
                          w0w @PiBa
                          last edited by

                          @piba This one is much better ๐Ÿ‘ ๐Ÿ˜€
                          It works!

                          1 Reply Last reply Reply Quote 0
                          • w0wW
                            w0w
                            last edited by

                            As expected, latest snapshot containing this PR boots normally.

                            P 1 Reply Last reply Reply Quote 0
                            • P
                              PiBa @w0w
                              last edited by

                              @w0w
                              Thanks, added your confirmation to the redmine ticked so it can be closed.

                              w0wW 1 Reply Last reply Reply Quote 0
                              • w0wW
                                w0w @PiBa
                                last edited by

                                @piba
                                Please let me know when you need testing gui 'none' selection fix โ˜บ

                                P 1 Reply Last reply Reply Quote 0
                                • P
                                  PiBa @w0w
                                  last edited by

                                  @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 ๐Ÿ˜‰ ..

                                  w0wW 1 Reply Last reply Reply Quote 0
                                  • w0wW
                                    w0w @PiBa
                                    last edited by w0w

                                    @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?

                                    P 1 Reply Last reply Reply Quote 0
                                    • P
                                      PiBa @w0w
                                      last edited by

                                      @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..

                                      1 Reply Last reply Reply Quote 0
                                      • w0wW
                                        w0w
                                        last edited by

                                        @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?

                                        P 1 Reply Last reply Reply Quote 0
                                        • P
                                          PiBa @w0w
                                          last edited by PiBa

                                          @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..

                                          w0wW 1 Reply Last reply Reply Quote 1
                                          • w0wW
                                            w0w @PiBa
                                            last edited by w0w

                                            @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!

                                            w0wW 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.