Bug #8846
closed
Misleading error message when adding/editing static routes which use a gateway on a disabled interface
Added by Mario Harjac about 6 years ago.
Updated about 1 year ago.
Plus Target Version:
23.09
Affected Architecture:
All
Description
I was adding static route on disabled interface and got the following message:
The following input errors were detected:
The gateway "10.66.0.99" is a different Address Family than network "10.66.10.0".
As you can see from the message itself, network and gateway are in the same family. I've tracked that down to the skipping of disabled interfaces in
return_gateways_array function.
Possible solutions:
- change error message to something like: "The gateway "10.66.0.99" is a different Address Family than network "10.66.10.0" or interface disabled"
- remove skipping of disabled interfaces
- automatically disable gateways on disabled interfaces
- Subject changed from Static routes - misleading error message to Misleading gateway error message adding/editing static routes using a disabled interface
- Status changed from New to Resolved
fixed
the GW will be disabled if the interface was disabled.
if there was a static route the GW will disappear if the interface is disabled.
22.05-RELEASE (amd64)
built on Wed Jun 22 18:56:13 UTC 2022
FreeBSD 12.3-STABLE
- Status changed from Resolved to Confirmed
- Priority changed from Low to Normal
- Target version set to 2.7.0
- Plus Target Version set to 23.05
- Affected Version set to 2.7.0
- Affected Architecture All added
I'm still able to replicate this in 22.05 and 23.01. And in 2.7.0.a.20230215.0600
Tested a gateway created directly on the interface and a gateway created separately in the subnet.
In both cases the gateway remains enabled after disabling the interface. If you then try to create a static route via that gateway the confusing error message is shown.
- Plus Target Version changed from 23.05 to 23.09
- Target version changed from 2.7.0 to CE-Next
- Assignee set to Jim Pingle
- Target version changed from CE-Next to 2.8.0
- Status changed from Confirmed to In Progress
- Status changed from In Progress to Feedback
- % Done changed from 0 to 100
- Subject changed from Misleading gateway error message adding/editing static routes using a disabled interface to Misleading error message when adding/editing static routes which use a gateway on a disabled interface
Updating subject for release notes.
- Status changed from Feedback to New
- Release Notes set to Default
The error can still appear when a dynamic gateway exists for the disabled interface:
The gateway "dynamic" is a different Address Family than network "10.0.50.0".
- Status changed from New to Feedback
- Status changed from Feedback to Resolved
Now works with dynamic gateways. For reference, saving a static route to an "inactive' dynamic gateway shows the following in the system logs:
Sep 21 18:04:56 php-fpm 1217 /system_routes.php: Gateway, NONE AVAILABLE
Sep 21 18:04:56 php-fpm 1217 /system_routes.php: Gateway, NONE AVAILABLE
Sep 21 18:04:56 php-fpm 1217 /system_routes.php: Static Routes: Gateway IP could not be found for 10.0.51.0/24
Additionally, re-enabling the interface correctly updates the routing table with the static route.
- Target version changed from 2.8.0 to 2.7.1
Also available in: Atom
PDF