diff options
author | Jens Georg <mail@jensge.org> | 2022-06-19 23:48:08 +0200 |
---|---|---|
committer | Jens Georg <mail@jensge.org> | 2022-06-22 19:55:39 +0200 |
commit | 40b3a09454b43ace8840bf9ca3c89a12f6433044 (patch) | |
tree | 963dd80b2dd74a4e5085eafb5872fd210d90c597 | |
parent | 5af5fbaea16423e0128b539d9b3a35bfe020a9e4 (diff) | |
download | gupnp-40b3a09454b43ace8840bf9ca3c89a12f6433044.tar.gz |
NetworkManager: Pass on address family to context
This way it starts supporting IPv6
Part of #10
-rw-r--r-- | libgupnp/gupnp-network-manager.c | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/libgupnp/gupnp-network-manager.c b/libgupnp/gupnp-network-manager.c index 2c192fa..b540a29 100644 --- a/libgupnp/gupnp-network-manager.c +++ b/libgupnp/gupnp-network-manager.c @@ -192,8 +192,14 @@ create_loopback_context (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) { g_warning ("Error creating GUPnP context: %s\n", @@ -247,13 +253,20 @@ create_context_for_device (NMDevice *nm_device) } } - nm_device->context = g_initable_new (GUPNP_TYPE_CONTEXT, - NULL, - &error, - "interface", iface, - "network", ssid, - "port", port, - NULL); + nm_device->context = g_initable_new ( + GUPNP_TYPE_CONTEXT, + NULL, + &error, + "interface", + iface, + "network", + ssid, + "port", + port, + "address-family", + gupnp_context_manager_get_socket_family ( + GUPNP_CONTEXT_MANAGER (nm_device->manager)), + NULL); g_free (iface); g_free (ssid); |