Skip to content
Snippets Groups Projects
Commit bff895cb authored by Nico Greger's avatar Nico Greger
Browse files

bugfix

parent d1cbf9d4
Branches master
No related tags found
No related merge requests found
Pipeline #1700 passed
ssn-janus (1.1.4) bullseye; urgency=medium
* Fixed bug that caused some mb67 addresses not to appear
-- Nico Greger <nico.greger@stusta.de> Thu, 11 May 2023 17:30:00 +0200
ssn-janus (1.1.3) bullseye; urgency=medium
* Fixed calculation off by one error on new port calculation
......
......@@ -153,7 +153,7 @@ def setup_redirects(config, binddn: str, bindpw: str, verbose: bool = False, exp
dorm_dict = dorms_port_to_ip_map[dorm_name]
if bool(config[dorm_name]["new_system"]):
if config[dorm_name]["new_system"].lower() == "true":
# computing port number based on the IP address (3 ports per room):
# Consider IP address in binary form: 32 digits.
# First 15 digits is the constant prefix -- discard them
......@@ -181,10 +181,11 @@ def setup_redirects(config, binddn: str, bindpw: str, verbose: bool = False, exp
else:
# Old system from before 29.04.2023 (IP-Armageddon)
for a in address:
octets = str(a).split(".")
for address in net:
octets = str(address).split(".")
port = 10000 + 256 * int(octets[2]) + int(octets[3])
dorm_dict[port] = str(a)
dorm_dict[port] = str(address)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment