Project

General

Profile

Actions

Bug #4813

closed

It's not possible to disable a static route that is set to use a gateway that is disabled using the edit dialogue.

Added by Steve Wheeler over 9 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Normal
Category:
Gateways
Target version:
Start date:
07/03/2015
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
All
Affected Architecture:

Description

If you attempt to edit a static route to disable it and the gateway set is already disabled you will receive the following:
The following input errors were detected:

The gateway '192.168.114.22' is a different Address Family as network '192.168.119.0'.

It can be disabled using the enable/disable button on the System > Routing, Routes tab.

Related to this. If you are disabling a route and gateway and first disable and save route then disable and save the gateway then apply the changes, the route is not removed from the system routing table.

Actions #1

Updated by Phillip Davis over 9 years ago

I just made a pull request for the first tiny error I noticed:
https://github.com/pfsense/pfsense/pull/1736

I am happy to look at this stuff. I have some code to check and;
a) not allow you to enable a route that uses a disabled gateway - either by the enable/disable buttons on the front Routes page, or by clearing the disabled checkbox when editing the route.
b) check the address family thing better, so if the route is disabled it will allow it to match with a gateway that is disabled (which is the problem with the silly message) - thus checking the address family matches even if the route and gateway are disabled.

The other problem is that the user can disable a gateway that has enabled routes. That code should also check and only allow the user to disable a gateway if all routes using it are already disabled. I will fix that up also.

After all that there should only be valid changes able to made made from the GUI. Hopefully those changes will all be implemented correctly - but I will check that because the "Related to this" paragraph looks like it will still be a problem.

Isn't input validation fun :)

Actions #2

Updated by Phillip Davis over 9 years ago

Validation of enable/disable of gateways and static routes
Pull request: https://github.com/pfsense/pfsense/pull/1738

That stops any invalid combinations of enabled/disabled gateways and static routes from being saved, and allows the valid ones.

In the next day or 2 I will try what happens if you make various changes to static routes and gateways without pressing apply after every step. And will fix whatever inconsistency I can see there.

Actions #3

Updated by Renato Botelho over 9 years ago

  • Category set to Gateways
  • Status changed from New to Feedback
  • Assignee set to Renato Botelho
  • Target version set to 2.3
  • % Done changed from 0 to 100

Pull request has been merged. Thanks!

Actions #5

Updated by Chris Buechler about 9 years ago

  • Status changed from Feedback to Resolved

works, thanks!

Actions #6

Updated by Chris Buechler over 8 years ago

  • Affected Version set to All
Actions

Also available in: Atom PDF