summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@debian.org>2018-02-22 17:43:40 +0100
committerYves-Alexis Perez <corsac@debian.org>2018-02-22 17:43:40 +0100
commitb7a467883bae8c2e28582697d0689fc5756e7758 (patch)
tree4f1f8ecc5fec0d309be1e6061664a5447f9c3dc8 /debian
parenta382fd6ae69690b924bf99e4085a4451e5451990 (diff)
downloadvyos-strongswan-b7a467883bae8c2e28582697d0689fc5756e7758.tar.gz
vyos-strongswan-b7a467883bae8c2e28582697d0689fc5756e7758.zip
charon-nm: Fix building list of DNS/MDNS servers with libnm
Diffstat (limited to 'debian')
-rw-r--r--debian/patches/05_charon-nm-Fix-building-list-of-DNS-MDNS-servers-with.patch33
-rw-r--r--debian/patches/series1
2 files changed, 34 insertions, 0 deletions
diff --git a/debian/patches/05_charon-nm-Fix-building-list-of-DNS-MDNS-servers-with.patch b/debian/patches/05_charon-nm-Fix-building-list-of-DNS-MDNS-servers-with.patch
new file mode 100644
index 000000000..fc2c991f5
--- /dev/null
+++ b/debian/patches/05_charon-nm-Fix-building-list-of-DNS-MDNS-servers-with.patch
@@ -0,0 +1,33 @@
+From ee8c25516a97a2c880a8033e1663628b6b05646a Mon Sep 17 00:00:00 2001
+From: Tobias Brunner <tobias@strongswan.org>
+Date: Wed, 21 Feb 2018 11:53:55 +0100
+Subject: [PATCH] charon-nm: Fix building list of DNS/MDNS servers with libnm
+
+g_variant_builder_add() creates a new GVariant using g_variant_new() and
+then adds it to the builder. Passing a GVariant probably adds the
+pointer to the array, not the value. I think an alternative fix would
+be to use "@u" as type string for the g_variant_builder_add() call, then
+the already allocated GVariant is adopted.
+
+Fixes: 9a71b7219ca3 ("charon-nm: Port to libnm")
+---
+ src/charon-nm/nm/nm_service.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/charon-nm/nm/nm_service.c b/src/charon-nm/nm/nm_service.c
+index 9beac392a..c42733181 100644
+--- a/src/charon-nm/nm/nm_service.c
++++ b/src/charon-nm/nm/nm_service.c
+@@ -65,8 +65,7 @@ static GVariant* handler_to_variant(nm_handler_t *handler,
+ enumerator = handler->create_enumerator(handler, type);
+ while (enumerator->enumerate(enumerator, &chunk))
+ {
+- g_variant_builder_add (&builder, "u",
+- g_variant_new_uint32 (*(uint32_t*)chunk.ptr));
++ g_variant_builder_add (&builder, "u", *(uint32_t*)chunk.ptr);
+ }
+ enumerator->destroy(enumerator);
+
+--
+2.16.1
+
diff --git a/debian/patches/series b/debian/patches/series
index fde45f535..ecc62570b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
02_disable-bypass-lan.patch
03_systemd-service.patch
04_disable-libtls-tests.patch
+05_charon-nm-Fix-building-list-of-DNS-MDNS-servers-with.patch