From d82a7dca775def87e0932d46e9d2d72d7f8151f6 Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Tue, 6 Jul 2010 13:58:27 +0200 Subject: [PATCH] bugfix: wrong protocol level for hop count change --- examples/tiny.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/tiny.c b/examples/tiny.c index cbe29025..6ade3903 100644 --- a/examples/tiny.c +++ b/examples/tiny.c @@ -61,7 +61,7 @@ main(int argc, char **argv) { struct timeval tv; coap_pdu_t *pdu; struct sockaddr_in6 dst; - int hops = 4; + int hops = 16; if ( argc > 1 && strncmp(argv[1], "-h", 2) == 0 ) { usage( argv[0] ); @@ -80,7 +80,7 @@ main(int argc, char **argv) { if ( IN6_IS_ADDR_MULTICAST(&dst.sin6_addr) ) { /* set socket options for multicast */ - if ( setsockopt( ctx->sockfd, SOL_SOCKET, IPV6_MULTICAST_HOPS, + if ( setsockopt( ctx->sockfd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, (char *)&hops, sizeof(hops) ) < 0 ) perror("setsockopt: IPV6_MULTICAST_HOPS");