]> git.ipfire.org Git - people/mfischer/ipfire-2.x.git/commitdiff
ddns: Pick up Michael's patch
authorPeter Müller <peter.mueller@ipfire.org>
Tue, 5 Apr 2022 05:54:38 +0000 (05:54 +0000)
committerPeter Müller <peter.mueller@ipfire.org>
Tue, 5 Apr 2022 05:54:38 +0000 (05:54 +0000)
https://wiki.ipfire.org/devel/telco/2022-04-04

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
lfs/ddns
src/patches/ddns-system-Catch-exception-when-host-is-not-dual-stacked.patch [new file with mode: 0644]

index 64bccaf478c70625624eee7738c428690c6ca6f4..274c12cb96f58fb2224c32d9f4c3c45c698bb1a1 100644 (file)
--- a/lfs/ddns
+++ b/lfs/ddns
@@ -1,7 +1,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007-2018  IPFire Team  <info@ipfire.org>                     #
+# Copyright (C) 2007-2022  IPFire Team  <info@ipfire.org>                     #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
@@ -73,6 +73,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
 
        # Apply upstream patches.
        cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/ddns-014-freednsafraid-fix-typo.patch
+       cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/ddns-system-Catch-exception-when-host-is-not-dual-stacked.patch
 
        cd $(DIR_APP) && [ -x "configure" ] || sh ./autogen.sh
        cd $(DIR_APP) && ./configure \
diff --git a/src/patches/ddns-system-Catch-exception-when-host-is-not-dual-stacked.patch b/src/patches/ddns-system-Catch-exception-when-host-is-not-dual-stacked.patch
new file mode 100644 (file)
index 0000000..f75471d
--- /dev/null
@@ -0,0 +1,35 @@
+From de57b2caf44bf10de72e42a20abf690eca50d512 Mon Sep 17 00:00:00 2001
+From: Michael Tremer <michael.tremer@ipfire.org>
+Date: Mon, 4 Apr 2022 10:33:46 +0100
+Subject: [PATCH] system: Catch exception when host is not dual-stacked
+
+This problem seems to have been introduced with an upgrade to Python
+3.10.
+
+Reported-by: Adrian Zaugg <ipfire.org@mailgurgler.com>
+Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
+---
+ src/ddns/system.py | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/ddns/system.py b/src/ddns/system.py
+index 73a27a5..48c9a8f 100644
+--- a/src/ddns/system.py
++++ b/src/ddns/system.py
+@@ -226,8 +226,12 @@ class DDNSSystem(object):
+                               if e.reason.errno == -2:
+                                       raise DDNSResolveError
++                              # Cannot assign requested address
++                              elif e.reason.errno == 99:
++                                      raise DDNSNetworkUnreachableError
++
+                               # Network Unreachable (e.g. no IPv6 access)
+-                              if e.reason.errno == 101:
++                              elif e.reason.errno == 101:
+                                       raise DDNSNetworkUnreachableError
+                               # Connection Refused
+-- 
+2.30.2
+