summaryrefslogtreecommitdiffstats
path: root/isys
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>1999-08-02 21:49:23 +0000
committerMatt Wilson <msw@redhat.com>1999-08-02 21:49:23 +0000
commit1c09b275897c8b12e3ba52ea51a99d6115e7884e (patch)
treeb764a128407b0c9c1b8cd85710216183f80a934b /isys
parentda05722407562f9ba8d9d7df7767b0b6a175046c (diff)
downloadanaconda-1c09b275897c8b12e3ba52ea51a99d6115e7884e.tar.gz
anaconda-1c09b275897c8b12e3ba52ea51a99d6115e7884e.tar.xz
anaconda-1c09b275897c8b12e3ba52ea51a99d6115e7884e.zip
netmask and broadcast
Diffstat (limited to 'isys')
-rw-r--r--isys/isys.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/isys/isys.py b/isys/isys.py
index 82808cbef..2e5ca6d12 100644
--- a/isys/isys.py
+++ b/isys/isys.py
@@ -42,9 +42,9 @@ def inet_aton (addr):
quad = string.splitfields (addr, ".")
try:
rc = ((string.atoi (quad[0]) << 24) +
- (string.atoi (quad[1]) << 16) +
- (string.atoi (quad[2]) << 8) +
- string.atoi (quad[3]))
+ (string.atoi (quad[1]) << 16) +
+ (string.atoi (quad[2]) << 8) +
+ string.atoi (quad[3]))
except IndexError:
raise ValueError
return rc
@@ -72,9 +72,9 @@ def inet_calcNetBroad (ip, nm):
ipaddr = ip
if isinstance (nm, type ("")):
- ipaddr = inet_aton (ip)
+ nmaddr = inet_aton (nm)
else:
- ipaddr = ip
+ nmaddr = nm
netaddr = ipaddr & nmaddr
bcaddr = netaddr | (~nmaddr);