Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    Cannot remove IPv6 static routes

    Scheduled Pinned Locked Moved IPv6
    8 Posts 2 Posters 293 Views 2 Watching
    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.
    • SteveITSS Offline
      SteveITS Galactic Empire
      last edited by

      Similar to https://redmine.pfsense.org/issues/12728 I am seeing routes not be removed?

      That report says "The command should be using -inet6 for IPv6 routes" but neither are used?

      Using -inet6 does work.

      Just looking for confirmation before I open a new bug, or reopen.

      NOTICE The command '/sbin/route delete 2603:x:x:fb41::/64 2603:x:x:fba0::2' returned exit code '68', the output was 'route: bad address: 2603:x:x:fb41::'
      

      If I run it manually from the GUI command prompt with -inet6 it works:
      Shell Output - /sbin/route delete -inet6 2603:x:x:fb41::/64 2603:x:x:fba0::2
      response:
      delete net 2603:x:x:fb41::/64: gateway 2603:x:x:fba0::2

      To upgrade, select your branch in System/Update/Update Settings. When upgrading, allow 10-15 minutes to reboot, or more depending on packages, CPU, and/or disk speed.
      Only install packages for your version of pfSense.
      Upvote ๐Ÿ‘ helpful posts!

      patient0P 1 Reply Last reply Reply Quote 0
      • patient0P Offline
        patient0 @SteveITS
        last edited by

        @SteveITS on what system is that happening? And how is the route added? That indeed sounds like the exact same issue as in the referenced ticket.

        But adding and removing a static route does work for me.

        SteveITSS 1 Reply Last reply Reply Quote 0
        • SteveITSS Offline
          SteveITS Galactic Empire @patient0
          last edited by

          @patient0 26.07.

          Added in the GUI some time ago.

          I was trying many things and Iโ€™m pretty sure I disabled the routes, will try to repro again this week.

          To upgrade, select your branch in System/Update/Update Settings. When upgrading, allow 10-15 minutes to reboot, or more depending on packages, CPU, and/or disk speed.
          Only install packages for your version of pfSense.
          Upvote ๐Ÿ‘ helpful posts!

          patient0P 1 Reply Last reply Reply Quote 0
          • patient0P Offline
            patient0 @SteveITS
            last edited by

            @SteveITS did you create a gateway for this route? Or using a gateway group (trying to recreated the issue)

            The fix is around line 1933 I assume (doesn't show the diff in the issue) in /etc/inc/system.inc. According to the tickets it's in system.inc and there seems to be the place where static routes get deleted:

               1931                 if (count($delete_targets)) {
               1932                         foreach ($delete_targets as $dts) {
               1933                                 if (is_subnetv4($dts)) {
               1934                                         $family = "-inet";
               1935                                 } else {
               1936                                         $family = "-inet6";       
               1937                                 }
               1938                                 $route = route_get($dts, '', true);
               1939                                 if (!count($route)) {
               1940                                         continue;
               1941                                 }
               1942                                 $toapplylist[] = "/sbin/route delete " .
               1943                                     $family . " " . $dts . " " . $delgw;
               1944                         }
               1945                 }
            

            Does your system.inc look the same?

            SteveITSS 1 Reply Last reply Reply Quote 0
            • SteveITSS Offline
              SteveITS Galactic Empire @patient0
              last edited by

              @patient0 Yes the routes have a gateway on LAN (sending traffic to an internal router).

              If I disable the route, and click Apply, I get the "NOTICE" (bad address) error in the system log, and the route is not removed.

              I then re-enabled the route, apply, delete it, apply, and the route is correctly deleted.

              So the bug does seem to be when disabling a route.

              Also I tried to add it back in again. I saved it, then before applying edited it again to change the description. I cannot do so, with error:

              "The following input errors were detected:
              A route to these destination networks already exists: [IPv6 subnet]"

              Only after applying the new route, can I then successfully edit it.

              To upgrade, select your branch in System/Update/Update Settings. When upgrading, allow 10-15 minutes to reboot, or more depending on packages, CPU, and/or disk speed.
              Only install packages for your version of pfSense.
              Upvote ๐Ÿ‘ helpful posts!

              SteveITSS 1 Reply Last reply Reply Quote 0
              • SteveITSS Offline
                SteveITS Galactic Empire @SteveITS
                last edited by SteveITS

                Hmm :

                function system_staticroutes_configure($interface = "", $update_dns = false) {
                (...)
                		foreach ($static_routes as $rtent) {
                			/* Do not delete disabled routes,
                			 * see https://redmine.pfsense.org/issues/3709
                			 * and https://redmine.pfsense.org/issues/10706 */
                

                The redmines sound a bit like it's intentional to avoid disabled static routes stepping on OpenVPN or other auto added routes? If so a graceful error seems more appropriate.

                Edit: not using OpenVPN or any VPN on this one.

                To upgrade, select your branch in System/Update/Update Settings. When upgrading, allow 10-15 minutes to reboot, or more depending on packages, CPU, and/or disk speed.
                Only install packages for your version of pfSense.
                Upvote ๐Ÿ‘ helpful posts!

                patient0P 1 Reply Last reply Reply Quote 0
                • patient0P Offline
                  patient0 @SteveITS
                  last edited by patient0

                  @SteveITS it's odd, I created one IPv6 gateway on LAN and two static routes (using the same gateway) of which I disabled one. No errors are show in any logs, neither when I disable it nor when I delete the disabled route.

                  Are they referred to somewhere else? Are they overlapping or in any other way special? Can you export the config and check if you see anything related to that routes/gateway(s) outside of the static routes section?

                  SteveITSS 1 Reply Last reply Reply Quote 0
                  • SteveITSS Offline
                    SteveITS Galactic Empire @patient0
                    last edited by

                    @patient0 They are not overlapping. They are sequential. They are also all in an alias, which seems irrelevant for this. That's the only other mention in the config of the /64 prefixes.

                    Given the code comment above it would now be interesting to find out whether they are supposed to be deleted, or not. Perhaps that function is irrelevant to this...I was just searching the file.

                    To upgrade, select your branch in System/Update/Update Settings. When upgrading, allow 10-15 minutes to reboot, or more depending on packages, CPU, and/or disk speed.
                    Only install packages for your version of pfSense.
                    Upvote ๐Ÿ‘ helpful posts!

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
                    Privacy Policy · Cookie Policy