1 From de57b2caf44bf10de72e42a20abf690eca50d512 Mon Sep 17 00:00:00 2001
2 From: Michael Tremer <michael.tremer@ipfire.org>
3 Date: Mon, 4 Apr 2022 10:33:46 +0100
4 Subject: [PATCH] system: Catch exception when host is not dual-stacked
6 This problem seems to have been introduced with an upgrade to Python
9 Reported-by: Adrian Zaugg <ipfire.org@mailgurgler.com>
10 Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
12 src/ddns/system.py | 6 +++++-
13 1 file changed, 5 insertions(+), 1 deletion(-)
15 diff --git a/src/ddns/system.py b/src/ddns/system.py
16 index 73a27a5..48c9a8f 100644
17 --- a/src/ddns/system.py
18 +++ b/src/ddns/system.py
19 @@ -226,8 +226,12 @@ class DDNSSystem(object):
20 if e.reason.errno == -2:
21 raise DDNSResolveError
23 + # Cannot assign requested address
24 + elif e.reason.errno == 99:
25 + raise DDNSNetworkUnreachableError
27 # Network Unreachable (e.g. no IPv6 access)
28 - if e.reason.errno == 101:
29 + elif e.reason.errno == 101:
30 raise DDNSNetworkUnreachableError