Project

General

Profile

Actions

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.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Gateways
Target version:
Start date:
08/28/2018
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
23.09
Release Notes:
Default
Affected Version:
2.7.0
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
Actions #1

Updated by Jim Pingle over 5 years ago

  • Category set to Gateways
Actions #2

Updated by Jim Pingle over 5 years ago

  • Subject changed from Static routes - misleading error message to Misleading gateway error message adding/editing static routes using a disabled interface
Actions #3

Updated by Alhusein Zawi over 2 years ago

  • 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

Actions #4

Updated by Steve Wheeler almost 2 years ago

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

Actions #5

Updated by Jim Pingle over 1 year ago

  • Plus Target Version changed from 23.05 to 23.09
Actions #6

Updated by Marcos M over 1 year ago

  • Target version changed from 2.7.0 to CE-Next
Actions #7

Updated by Jim Pingle over 1 year ago

  • Assignee set to Jim Pingle
  • Target version changed from CE-Next to 2.8.0
Actions #8

Updated by Jim Pingle about 1 year ago

  • Status changed from Confirmed to In Progress
Actions #9

Updated by Jim Pingle about 1 year ago

  • Status changed from In Progress to Feedback
  • % Done changed from 0 to 100
Actions #10

Updated by Jim Pingle about 1 year ago

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

Actions #11

Updated by Marcos M about 1 year ago

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

Actions #12

Updated by Jim Pingle about 1 year ago

  • Status changed from New to Feedback
Actions #13

Updated by Marcos M about 1 year ago

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

Actions #14

Updated by Jim Pingle about 1 year ago

  • Target version changed from 2.8.0 to 2.7.1
Actions

Also available in: Atom PDF