summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0004-lp1039729.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0004-lp1039729.patch')
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0004-lp1039729.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0004-lp1039729.patch b/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0004-lp1039729.patch
new file mode 100644
index 000000000..695b26567
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw/0004-lp1039729.patch
@@ -0,0 +1,40 @@
+Origin: r803, r804
+Description: Don't call get_netfilter_capabilities() with ipv6 if ipv6 is
+ disabled.
+Bug-Ubuntu: https://launchpad.net/ufw/bugs/1039729
+
+Upstream-Status: Inappropriate [ not author ]
+
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+
+Index: ufw-0.33/src/backend.py
+===================================================================
+--- ufw-0.33.orig/src/backend.py 2012-12-04 09:21:57.000000000 -0600
++++ ufw-0.33/src/backend.py 2012-12-04 09:22:40.000000000 -0600
+@@ -98,15 +98,17 @@
+ else:
+ self.caps['limit']['4'] = False
+
+- # v6
+- try:
+- nf_caps = ufw.util.get_netfilter_capabilities(self.ip6tables)
+- except OSError as e:
+- error("initcaps\n%s" % e)
+- if 'recent-set' in nf_caps and 'recent-update' in nf_caps:
+- self.caps['limit']['6'] = True
+- else:
+- self.caps['limit']['6'] = False
++ # v6 (skip capabilities check for ipv6 if ipv6 is disabled in ufw
++ # because the system may not have ipv6 support (LP: #1039729)
++ if self.use_ipv6():
++ try:
++ nf_caps = ufw.util.get_netfilter_capabilities(self.ip6tables)
++ except OSError as e:
++ error("initcaps\n%s" % e)
++ if 'recent-set' in nf_caps and 'recent-update' in nf_caps:
++ self.caps['limit']['6'] = True
++ else:
++ self.caps['limit']['6'] = False
+
+ def is_enabled(self):
+ '''Is firewall configured as enabled'''
OpenPOWER on IntegriCloud