projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2512040
)
Allow scoped addresses to be used for IPv6 multicast socket.
author
Guus Sliepen
<guus@tinc-vpn.org>
Sun, 25 Mar 2012 12:42:10 +0000
(13:42 +0100)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Sun, 25 Mar 2012 12:42:10 +0000
(13:42 +0100)
src/multicast_device.c
patch
|
blob
|
history
diff --git
a/src/multicast_device.c
b/src/multicast_device.c
index
495f8fc
..
879eb66
100644
(file)
--- a/
src/multicast_device.c
+++ b/
src/multicast_device.c
@@
-119,7
+119,7
@@
static bool setup_device(void) {
struct sockaddr_in6 in6;
memcpy(&in6, ai->ai_addr, sizeof in6);
memcpy(&mreq.ipv6mr_multiaddr, &in6.sin6_addr, sizeof mreq.ipv6mr_multiaddr);
- mreq.ipv6mr_interface =
0
;
+ mreq.ipv6mr_interface =
in6.sin6_scope_id
;
if(setsockopt(device_fd, IPPROTO_IPV6, IPV6_JOIN_GROUP, &mreq, sizeof mreq)) {
logger(LOG_ERR, "Cannot join multicast group %s %s: %s", host, port, sockstrerror(sockerrno));
closesocket(device_fd);