From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tapani Tarvainen To: development@lists.ipfire.org Subject: Re: Confusing error message Date: Sat, 14 Sep 2019 17:56:21 +0300 Message-ID: <20190914145621.GA14254@tarvainen.info> In-Reply-To: <2c5fbfd6-c541-0c3a-bb29-37126478e64c@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7549816889884703566==" List-Id: --===============7549816889884703566== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Sat, Sep 14, 2019 at 03:55:00PM +0200, Matthias Fischer (matthias.fischer(= a)ipfire.org) wrote: >=20 > On 14.09.2019 15:29, Tapani Tarvainen wrote: > > I just spent a stupid amount of time trying to figure out why IpFire > > insisted a fixed lease had "invalid fixed ip address" when I could > > see nothing wrong with the address. > >=20 > > I had to read the source before I realized where the problem was: the > > same error message is also used when the *next-server* address is bad, > > and it doesn't accept server name there but wants an IP. >=20 > To be sure: do you mean this if-clause in 'dhcp.cgi'? >=20 > ... > if ($dhcpsettings{'FIX_NEXTADDR'}) { > unless(&General::validip($dhcpsettings{'FIX_NEXTADDR'})) { > $errormessage =3D $Lang::tr{'invalid fixed ip address'}; } > } Exactly. > > I guess this would not be the most critical thing to fix but at least > > changing the error message would be nice. >=20 > Yep. Should be easy. >=20 > Adjusting 'dhcp.cgi' and the 'lang'-string for the errormessage should > be sufficient. I just need your confirmation. >=20 > Would the errormessage 'invalid ip' =3D> 'Invalid IP Address' be clear > enough/sufficient? >=20 > Alternative: > 'invalid next-server ip' =3D> 'Invalid IP Address for next-server' The latter is much better, as it makes it instantly clear *where* the error lies. Thank you, --=20 Tapani Tarvainen --===============7549816889884703566==--