Bug 13917

Summary: Legend in dns.cgi disappears
Product: IPFire Reporter: Adam <ag>
Component: ---Assignee: Michael Tremer <michael.tremer>
Status: ON_QA --- QA Contact:
Severity: Aesthetic Issue    
Priority: - Unknown - CC: adolf.belka, bbitsch, michael.tremer
Version: 2   
Hardware: all   
OS: All   

Description Adam 2025-12-05 14:12:02 UTC
Description
-----------

When activating “Use ISP-assigned DNS servers” in the WUI of IPFire, a legend appears underneath the DNS provider setting. If the option is unticked, the legend disappears.

Steps to reproduce
------------------

Install or update to IPFire with a build matching CU 199 75ecc483 (also tested on CU 200 d33730b6)

Go to: Networking → Domain Name System

Tick (enable) the “Use ISP-assigned DNS servers” option. Observe that a legend appears.

Untick (disable) the “Use ISP-assigned DNS servers” option. Observe that the legend disappears.

Expected behaviour
------------------

The DNS legend should always be viable.

Reference
---------

https://community.ipfire.org/t/legend-or-not/15316
Comment 1 Bernhard Bitsch 2025-12-05 14:22:18 UTC
The bug is also present in CU198.
Comment 2 Bernhard Bitsch 2025-12-05 19:15:10 UTC
The solution is just to change line 714, file /srv/web/cgi-bin/dns.cgi
from

if (($settings{'USE_ISP_NAMESERVERS'} eq "on") && ($server_amount > 2)) {

to

if ($server_amount > ($settings{'USE_ISP_NAMESERVERS'} eq "on")?2:0) {
Comment 3 Michael Tremer 2025-12-09 11:49:44 UTC
Thanks for reporting and thanks for the suggested fix. I took the fix, but made it slightly more readable instead of having everything in one line:

> https://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff;h=5489d3994a93f95e4e85bf5cdc711b6b0eef01ca