mirror of
https://github.com/obgm/libcoap.git
synced 2026-10-26 20:51:38 +03:00
bugfix: wrong protocol level for hop count change
This commit is contained in:
1 parent
feabb53c6c
commit
d82a7dca77
1 file changed
+2
-2
+2
-2
@@ -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");
|
||||
|
||||
|
||||
Reference in new issue
Block a user