Cannot remove IPv6 static routes
-
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 -
@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.
-
@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.
-
@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?
-
@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.
-
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.
-
@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?
-
@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.
Privacy Policy · Cookie Policy