Bug #8922
closedStatic routes set by system.inc for DNS gateway bindings are not removed
100%
Description
I found some bugs with system.inc and system.php while troubleshooting a recent issue.
quick repro (2 different bugs):
first
1. go to System > General
2. click 'add dns server' button
3. enter 5.6.7.8 and choose a gateway
4. save
5. delete 5.6.7.8
6. save
static route for 5.6.7.8 is still present on your system, with no way to remove it
(you can confirm with `netstat -4rn`)
second
1. go to System > General
2. add dns server: 1.2.3.4
3. add dns server 2.3.4.5
(you can choose gateways or leave 'none')
4. save
5. delete those 2 dns servers
6. save
<dns2gw> and <dns3gw> remain in the config.xml (orphans)
I pushed this commit that fixes these as well as some other minor changes to make System > General work better (more detail on the PR)
https://github.com/pfsense/pfsense/commit/f211d7c0dcd75369c8f51765e23e7752f593b9af
tested on latest 2.4.4 snaps on both a sg-3100 and sg-4860