Changing an Interface name to be the same as an existing alias name still lets the user apply the changes
1) Make an alias, e.g. ZLAN
2) Interfaces->LAN - change the description to ZLAN
A message is displayed "Sorry, an alias with the name ZLAN already exists." But actually the change has already been saved to config.xml. The "Apply changes" box and button is showing.
3) Press Apply
Now you get "Error loading the rules" notice.
This happens in 2.2.6 (and presumably earlier releases) and in 2.3. I will provide PRs for both.
Fix #5778 do not save changes if interface description matches an alias name - RELENG_2_2
Fix #5778 do not save changes if interface description matches an alias name
See https://redmine.pfsense.org/issues/5778 for details of how to reproduce the problem.
Note that similar code to make the "Sorry, an alias with the name XXX already exists" message is also at the top of interfaces.inc - it compares the current interface descr from the config with the currently existing alias names. That check would help warn the user if someone managed to add an alias name that matched the interface name. I guess it was there from some time in the past when the alias edit code did not cross-validate the alias name with the interface descriptions. I have left that check there - it does no harm to have it "just in case".
The new code that I added checks the proposed interface description in $_POST against the existing alias names and will give an input_error if there is a match.