Bug #7435


Cannot edit IP address in a host override

Added by Phillip Davis about 5 years ago. Updated about 5 years ago.

Web Interface
Target version:
Start date:
Due date:
% Done:


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



In either of DNS Forwarder or Resolver:
a) Add some host override, e.g. host 'x' domain '' IP address ''
b) Save and Apply
c) Edit the host override. Change the IP address a bit, e.g. ''
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.

Actions #2

Updated by Phillip Davis about 5 years ago

PR with more stuff and a slightly different way to fix:

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.

Actions #3

Updated by Jim Pingle about 5 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!

Actions #4

Updated by Anonymous about 5 years ago

I am not able to reproduce this in DNS Resolver (unbound) on 2.4.0.b.20170401.1306.

Actions #5

Updated by Jim Pingle about 5 years ago

  • Status changed from Feedback to Resolved
Actions #6

Updated by Jim Pingle about 5 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 ()

Also available in: Atom PDF