Bug #7435
closedCannot edit IP address in a host override
0%
Description
Forum: https://forum.pfsense.org/index.php?topic=127835.0
In either of DNS Forwarder or Resolver:
a) Add some host override, e.g. host 'x' domain 'example.com' IP address '192.168.11.22'
b) Save and Apply
c) Edit the host override. Change the IP address a bit, e.g. '192.168.11.33'
d) Press Save
Validation message is shown "This host/domain already exists."
Press "Save" again. This time it works! And the entry has the changes IP address.
Note: The forum entry talks about having 2 host overrides with the same host+domain, 1 for IPv4 and 1 for IPv6. But actually that complication is not necessary in order to get the bug.
It works OK in 2.3.4-development, so I guess is broken in 2.4 somehow.
It needs a bit of testing to find all the weird things that can go wrong.
Updated by Phillip Davis over 7 years ago
Updated by Phillip Davis over 7 years ago
PR with more stuff and a slightly different way to fix:
https://github.com/pfsense/pfsense/pull/3679
And this bug is a little more widespread/general than in he original report. There is a problem on some edit pages that the "id" is not remembered correctly to be POSTed back. So after pressing save, the "system" thinks it is a new entry. Either:
a) a duplicate entry is created (DNS Forwarder Domain Override Edit) or
b) the validation complains that there is some sort of data duplication problem (thinks the entry is already there, which it is!) and so refuses to save the edit - DNS Forwarder/Resolver Host Override Edit, Captice Portal Voucher Roll Edit.
These problems all are apparent in 2.4 master due to the changes related to $_GET, $_POST, $_REQUEST. But actually the problem has been latent in the code in 2.3.* so the fixes could (should?) be back-ported there also.
Updated by Jim Pingle over 7 years ago
- Status changed from New to Feedback
Looks good. I managed to reproduce this late yesterday but left myself a note to check on it this morning again with fresh eyes. Guess I don't have to now :-)
Fix looks good, and I can't reproduce the problem with the patch applied. PR merged. Thanks!
Updated by Anonymous over 7 years ago
I am not able to reproduce this in DNS Resolver (unbound) on 2.4.0.b.20170401.1306.
Updated by Jim Pingle over 7 years ago
- Target version changed from 2.4.0 to 2.3.4
- Affected Version changed from 2.4 to All
- Affected Architecture All added
- Affected Architecture deleted (
)