Bug #16495
openDisplayed gateway order is incorrect after a new order is saved
100%
Description
- Re-arranging the gateways order doesn't save the changes
- After clicking Save it reverts back to the previous state
Default Gateway Sorting:
Moving WANGW2 at the top:
After clicking Save the changes are reverted:
Tested against:
25.07.1-RELEASE (amd64)
built on Wed Aug 20 12:17:00 UTC 2025
FreeBSD 15.0-CURRENT
Files
Updated by Christopher Cope 26 days ago
- Status changed from New to Confirmed
There is a lot of oddities going on here.
Firstly, the behavior on this page is not consistent with the rest of the firewall. I would expect to drag the gateways similarly to the firewall rules.
Instead it places the selected gateway(s) above the one that is clicked. This leads to a weird situation where it it placed where the mouse is clicked when moving up and 1 spot above where the mouse is clicked when moving down.
Secondly, the changes always "revert" after save, but when the page is immediately refreshed on certain moves the changes apply. I think the ones that aren't applied are related to dynamic gateways.
Marking confirmed.
Updated by → luckman212 5 days ago
Does it even make sense to "sort" this table? I never thought that the order shown on the Gateways page had any effect on the routing decisions. I would assume this to be determined instead by Gateway Groups, Policy Based Routes, Static Routes, and the kernel routing table (FRR/BGP if used).
Updated by Jim Pingle 3 days ago
Christopher Cope wrote in #note-1:
Firstly, the behavior on this page is not consistent with the rest of the firewall. I would expect to drag the gateways similarly to the firewall rules.
Only rules support drag-and-drop, there are other pages which work identically to this, like IPsec tunnels.
Instead it places the selected gateway(s) above the one that is clicked. This leads to a weird situation where it it placed where the mouse is clicked when moving up and 1 spot above where the mouse is clicked when moving down.
That is the expected behavior, see the description of the anchor icon here: https://docs.netgate.com/pfsense/en/latest/config/manage-item-lists.html
→ luckman212 wrote in #note-2:
Does it even make sense to "sort" this table? I never thought that the order shown on the Gateways page had any effect on the routing decisions. I would assume this to be determined instead by Gateway Groups, Policy Based Routes, Static Routes, and the kernel routing table (FRR/BGP if used).
Reordering gateways can be useful for certain use cases that might depend on the order of gateways in this list, such as automatic default gateway behavior (when not using a group).
Updated by Marcos M 1 day ago
- Project changed from pfSense Plus to pfSense
- Subject changed from System>Routing - Gateway Sorting Is Not Saving Changes to Gateway order is incorrect after saving a new order until the page is refreshed
- Category changed from Gateways to Gateways
- Assignee set to Marcos M
- Target version set to 2.9.0
- Affected Plus Version deleted (
25.07.1) - Plus Target Version set to 25.11
Updated by Marcos M 1 day ago
- Status changed from Confirmed to Feedback
- % Done changed from 0 to 100
The issue is cosmetic. The order is stored correctly but needs a page refresh to show it.
Applied in changeset c951eb9afb8786c410ae804bc5dfc7b3f57afd8c.