mirror of
https://github.com/yarrick/iodine.git
synced 2025-04-07 11:07:03 +00:00
Iodine: IPv6
This commit is contained in:
parent
f56f7100f6
commit
b4f007a929
2 changed files with 6 additions and 6 deletions
|
@ -231,7 +231,7 @@ setaddr:
|
|||
memset(&nameserv6, 0, sizeof(nameserv6));
|
||||
nameserv6.sin6_family = AF_INET6;
|
||||
nameserv6.sin6_port = htons(port);
|
||||
inet_pton(AF_INET6, "2001:4ca0:2001:18:216:3eff:fe99:4d2b", &(nameserv6.sin6_addr));
|
||||
inet_pton(AF_INET6, "2620:0:ccc::2", &(nameserv6.sin6_addr));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1689,7 +1689,7 @@ handshake_raw_udp(int dns_fd, int seed)
|
|||
|
||||
raw_serv6.sin6_family = AF_INET6;
|
||||
raw_serv6.sin6_port = htons(53);
|
||||
inet_pton(AF_INET6, "2001:4ca0:2001:18:216:3eff:fe99:4d2b", &(raw_serv6.sin6_addr));
|
||||
inet_pton(AF_INET6, "2001:470:0:473::473", &(raw_serv6.sin6_addr));
|
||||
|
||||
/* do login against port 53 on remote server
|
||||
* based on the old seed. If reply received,
|
||||
|
|
|
@ -2023,11 +2023,11 @@ read_dns(int fd, int tun_fd, struct query *q) /* FIXME: tun_fd is because of raw
|
|||
|
||||
if (r > 0) {
|
||||
if (v6_listen) {
|
||||
memcpy(&q->from.v6, &from6,
|
||||
memcpy((struct sockaddr*) &q->from, (struct sockaddr*) &from6,
|
||||
sizeof(struct sockaddr_in6));
|
||||
q->fromlen = sizeof(struct sockaddr_in6);
|
||||
} else {
|
||||
memcpy((struct sockaddr*) &q->from.v4, (struct sockaddr*) &from,
|
||||
memcpy((struct sockaddr*) &q->from, (struct sockaddr*) &from,
|
||||
addrlen);
|
||||
q->fromlen = addrlen;
|
||||
}
|
||||
|
@ -2221,9 +2221,9 @@ write_dns(int fd, struct query *q, char *data, int datalen, char downenc)
|
|||
}
|
||||
|
||||
printf("write_dns()\n");
|
||||
ipv6_print(&q->from.v6.sin6_addr, 44);
|
||||
ipv6_print(&q->from.v6, 44);
|
||||
|
||||
sendto(fd, buf, len, 0, (struct sockaddr*)&q->from, q->fromlen);
|
||||
sendto(fd, buf, len, 0, (struct sockaddr*)&(q->from.v6), q->fromlen);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Add table
Reference in a new issue