]> git.sesse.net Git - nms/commitdiff
Readjust where the IPs start.
authorSteinar H. Gunderson <sesse@samfundet.no>
Thu, 6 Apr 2006 13:26:00 +0000 (13:26 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Thu, 6 Apr 2006 13:26:00 +0000 (13:26 +0000)
zyxel/zyxelcommon.py

index e6f1c4feab641827666105a54a7abe7b1f7ec0ba..1c1ca7878c07ea1b8de54a80cbac8ac278460134 100644 (file)
@@ -18,8 +18,8 @@ def retSubnet(sw):
 
 def retIP(sw):
     (rad,num) = sw
-    gangefaktor = rad - ((rad - 1) / 2)
-    lopenr = 2 + 6 * gangefaktor + num
+    drad = (rad + 1) / 2
+    lopenr = 6 * drad + num - 5
     return NETWORK + ".%s.%s" % (retSubnet(sw), lopenr)
 
 # ooh, fugly