Bug 22196 - shell-ip-address: 0.0.0.0 is not valid
Summary: shell-ip-address: 0.0.0.0 is not valid
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: libshell (show other bugs)
Version: unstable
Hardware: all Linux
: P3 normal
Assignee: Alexey Gladkov
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-06 18:54 MSK by Sir Raorn
Modified: 2010-04-29 19:26 MSD (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sir Raorn 2009-11-06 18:54:13 MSK
0.0.0.0 should be treated as valid IP address since it is possible to run service on this IP (which means "all interfaces and addresses") and connect to this address (using http://0.0.0.0:3000/ for local Rails applications works too).

Another issue, addresses like A.B.C.0 CAN be valid if netmask (which is not taken in account in this checks) is greater than /24.
Comment 1 Alexey Gladkov 2009-11-06 19:44:24 MSK
Function and regular expressions make only what is described in the commentary in the source text. You want real ip calculator?

(english powered by translate.google.com)
Comment 2 Alexey Gladkov 2010-04-29 19:26:55 MSD
Добавлено несколько функций:

ipv4_ip_subnet
ipv4_mask2prefix
ipv4_prefix2mask