[gupnp/wip/ipv6-everywhere: 2/4] Connman: Pass on address family




commit 300ab20af085b992a43775f53e2cdb46c19a547f
Author: Jens Georg <mail jensge org>
Date:   Mon Jun 20 00:02:11 2022 +0200

    Connman: Pass on address family
    
    This should enable ipv6 for connman-managed contexts
    
    Part of #10

 libgupnp/gupnp-connman-manager.c | 30 +++++++++++++++++++++---------
 1 file changed, 21 insertions(+), 9 deletions(-)
---
diff --git a/libgupnp/gupnp-connman-manager.c b/libgupnp/gupnp-connman-manager.c
index 4dbd02c..5e20bfe 100644
--- a/libgupnp/gupnp-connman-manager.c
+++ b/libgupnp/gupnp-connman-manager.c
@@ -96,8 +96,13 @@ loopback_context_create (gpointer data)
         context = g_initable_new (GUPNP_TYPE_CONTEXT,
                                   NULL,
                                   &error,
-                                  "interface", LOOPBACK_IFACE,
-                                  "port", port,
+                                  "interface",
+                                  LOOPBACK_IFACE,
+                                  "port",
+                                  port,
+                                  "address-family",
+                                  gupnp_context_manager_get_socket_family (
+                                          GUPNP_CONTEXT_MANAGER (manager)),
                                   NULL);
 
         if (error != NULL) {
@@ -118,13 +123,20 @@ service_context_create (CMService *cm_service)
 {
         GError  *error = NULL;
 
-        cm_service->context = g_initable_new (GUPNP_TYPE_CONTEXT,
-                                              NULL,
-                                              &error,
-                                              "interface", cm_service->iface,
-                                              "network", cm_service->name,
-                                              "port", cm_service->port,
-                                              NULL);
+        cm_service->context = g_initable_new (
+                GUPNP_TYPE_CONTEXT,
+                NULL,
+                &error,
+                "interface",
+                cm_service->iface,
+                "network",
+                cm_service->name,
+                "port",
+                cm_service->port,
+                "address-family",
+                gupnp_context_manager_get_socket_family (
+                        GUPNP_CONTEXT_MANAGER (cm_service->manager)),
+                NULL);
 
         if (error != NULL) {
                 g_warning ("Error creating GUPnP context: %s", error->message);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]