Bug#224912: should check if IP address is well-formed
* Thiemo Seufer <ica2_ts@csv.ica.uni-stuttgart.de> [2003-12-23 20:12]:
> > I wanted to configure a static address and made a typo and wrote
> > "10.0.144". netcfg didn't spot this at all, and only failed at the
> > end when bringing up the network, saying "Erorr while activating the
> > network" and nothing more. I had no idea what was wrong, until I
> > noticed the silly typo. Please make sure that the IP address is well
> > formed, and if it is not, complain.
>
> IIRC 10.0.144 _is_ a well formed IP address. It's a rememnant from
> classful addressing, being a shortcut for 10.0.0.144.
Hmm, indeed, putting 10.0.144 in /etc/network/interfaces seems to
work. However, during netcfg I definitely got an error and I'm pretty
sure it was due to the 10.0.144 address.
However, how many people really use addresses like 10.0.144? I still
think sanity checking for 4 0-256 values separated by dots is a good
idea, especially for inexperienced people. Or I suppose checking for
2-4 0-256 values would work in both cases.
--
Martin Michlmayr
tbm@cyrius.com
Reply to: