From 463bbda30221815bd300bed7c7a57540c13cd2f3 Mon Sep 17 00:00:00 2001 From: hoellen Date: Thu, 25 Jul 2019 11:55:40 +0200 Subject: [PATCH] Allow subnet with host bit set in setup --- setup/server.py | 2 +- towncrier/newsfragments/1083.bugfix | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 towncrier/newsfragments/1083.bugfix diff --git a/setup/server.py b/setup/server.py index 0bb25a51..b2ca2175 100644 --- a/setup/server.py +++ b/setup/server.py @@ -91,7 +91,7 @@ def build_app(path): data = flask.request.form.copy() data['uid'] = str(uuid.uuid4()) try: - data['dns'] = str(ipaddress.IPv4Network(data['subnet'])[-2]) + data['dns'] = str(ipaddress.IPv4Network(data['subnet'], strict=False)[-2]) except ValueError as err: return "Error while generating files: " + str(err) db.set(data['uid'], json.dumps(data)) diff --git a/towncrier/newsfragments/1083.bugfix b/towncrier/newsfragments/1083.bugfix new file mode 100644 index 00000000..3fa17d9a --- /dev/null +++ b/towncrier/newsfragments/1083.bugfix @@ -0,0 +1 @@ +Allow subnet with host bit set in setup