Commit 597e059a authored by Marcin Siodelski's avatar Marcin Siodelski

[master] [1908] Added v6 socket binding to local-link address

parent e0cb5ab6
...@@ -1236,6 +1236,13 @@ getsock6(void) ...@@ -1236,6 +1236,13 @@ getsock6(void)
perror("socket"); perror("socket");
exit(1); exit(1);
} }
ret = bind(sock,
(struct sockaddr *) &localaddr,
sizeof(struct sockaddr_in6));
if (ret < 0) {
perror("Failed to bind v6 socket to local-link address");
exit(1);
}
/* perform the multicast stuff when the destination is multicast */ /* perform the multicast stuff when the destination is multicast */
if (IN6_IS_ADDR_MULTICAST(&s6->sin6_addr)) { if (IN6_IS_ADDR_MULTICAST(&s6->sin6_addr)) {
int hops = 1; int hops = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment