diff --git a/sstpd/address.py b/sstpd/address.py index 9555b46..2d83902 100644 --- a/sstpd/address.py +++ b/sstpd/address.py @@ -20,6 +20,8 @@ def _next_host(self): def register(self, address): + if isinstance(address, str): + address = address.decode() addr = ipaddress.ip_address(address) if addr in self._pool: raise RegisteredException() @@ -45,6 +47,8 @@ def apply(self): def unregister(self, address): + if isinstance(address, str): + address = address.decode() addr = ipaddress.ip_address(address) try: self._pool.remove(addr)