From: Tapani Tarvainen <ipfire@tapanitarvainen.fi>
To: development@lists.ipfire.org
Subject: Re: Confusing error message
Date: Sat, 14 Sep 2019 17:56:21 +0300 [thread overview]
Message-ID: <20190914145621.GA14254@tarvainen.info> (raw)
In-Reply-To: <2c5fbfd6-c541-0c3a-bb29-37126478e64c@ipfire.org>
[-- Attachment #1: Type: text/plain, Size: 1414 bytes --]
On Sat, Sep 14, 2019 at 03:55:00PM +0200, Matthias Fischer (matthias.fischer(a)ipfire.org) wrote:
>
> 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.
> >
> > 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.
>
> To be sure: do you mean this if-clause in 'dhcp.cgi'?
>
> ...
> if ($dhcpsettings{'FIX_NEXTADDR'}) {
> unless(&General::validip($dhcpsettings{'FIX_NEXTADDR'})) {
> $errormessage = $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.
>
> Yep. Should be easy.
>
> Adjusting 'dhcp.cgi' and the 'lang'-string for the errormessage should
> be sufficient. I just need your confirmation.
>
> Would the errormessage 'invalid ip' => 'Invalid IP Address' be clear
> enough/sufficient?
>
> Alternative:
> 'invalid next-server ip' => 'Invalid IP Address for next-server'
The latter is much better, as it makes it instantly clear *where* the
error lies.
Thank you,
--
Tapani Tarvainen
next prev parent reply other threads:[~2019-09-14 14:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-14 13:29 Tapani Tarvainen
2019-09-14 13:55 ` Matthias Fischer
2019-09-14 14:02 ` Aw: " Bernhard Bitsch
2019-09-14 14:56 ` Tapani Tarvainen [this message]
2019-09-14 16:31 ` Matthias Fischer
2019-09-14 18:09 ` Tom Rymes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190914145621.GA14254@tarvainen.info \
--to=ipfire@tapanitarvainen.fi \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox