Changeset 4149 in genesis
- Timestamp:
- Mar 24, 2005, 3:30:10 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
nodes/getrange.py
r3130 r4149 4 4 import re 5 5 6 ipre = re.compile("^IP=(172\.16\.[0-9]+\.[0-9]+)/ 30*")6 ipre = re.compile("^IP=(172\.16\.[0-9]+\.[0-9]+)/([0-9]+) *") 7 7 8 8 def parseaddr(s): … … 26 26 print "'" + l + "'" 27 27 addr = parseaddr(match.group(1)) 28 addr = addr & 0xfffffffcL 28 mask = int(match.group(2)) 29 addr = addr & ~((1 << (32 - mask)) - 1) 29 30 bezet[addr] = 1 30 31
Note:
See TracChangeset
for help on using the changeset viewer.