diff --git a/CHANGELOG.md b/CHANGELOG.md index 4498ddf..62d7d6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Fixed + +- Handle addresses with zone id by ignoring the interface part (#184) + ## [0.7.1] - 2023-03-04 ### Added diff --git a/src/wsdd.py b/src/wsdd.py index 39f54c9..befb29c 100755 --- a/src/wsdd.py +++ b/src/wsdd.py @@ -93,7 +93,7 @@ class NetworkAddress: def __init__(self, family: int, raw: Union[bytes, str], interface: NetworkInterface) -> None: self._family = family - self._raw_address = raw if isinstance(raw, bytes) else socket.inet_pton(family, raw) + self._raw_address = raw if isinstance(raw, bytes) else socket.inet_pton(family, raw.partition('%')[0]) self._interface = interface self._address_str = socket.inet_ntop(self._family, self._raw_address)