[gssdp/wip/master/ipv6: 7/7] wip: Add max hops for v6



commit 363cf6418f7b7a0ba4ea00a55c520afab906d660
Author: Jens Georg <mail jensge org>
Date:   Thu Feb 18 11:20:17 2016 +0100

    wip: Add max hops for v6
    
    Signed-off-by: Jens Georg <mail jensge org>

 libgssdp/gssdp-socket-source.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/libgssdp/gssdp-socket-source.c b/libgssdp/gssdp-socket-source.c
index de27394..01a81f0 100644
--- a/libgssdp/gssdp-socket-source.c
+++ b/libgssdp/gssdp-socket-source.c
@@ -239,9 +239,14 @@ gssdp_socket_source_do_init (GInitable                   *initable,
         }
 
         /* TTL */
-        if (!priv->ttl)
+        if (priv->ttl == 0) {
                 /* UDA/1.0 says 4, UDA/1.1 says 2 */
                 priv->ttl = 4;
+                if (family == G_SOCKET_FAMILY_IPV6) {
+                        /* UDA 2.0, Annex A says 10 hops */
+                        priv->ttl = 10;
+                }
+        }
 
         g_socket_set_multicast_ttl (priv->socket, priv->ttl);
 


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