mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-26 01:59:19 +02:00
Stop client if server is restarted
This commit is contained in:
parent
bd45e6ccb2
commit
b38293c11b
|
@ -18,6 +18,7 @@ CHANGES:
|
|||
from Francois Revol. Still work to do to get tun device working.
|
||||
- Added capability to forward DNS queries outside tunnel domain to
|
||||
a nameserver on localhost. Use -b port to enable.
|
||||
- iodine client now shuts down if it detects a server restart.
|
||||
|
||||
2008-08-06: 0.4.2 "Opened Zone"
|
||||
- Applied a few small patches from Maxim Bourmistrov and Gregor Herrmann
|
||||
|
|
|
@ -226,6 +226,12 @@ tunnel_dns(int tun_fd, int dns_fd)
|
|||
if ((read = read_dns(dns_fd, in, sizeof(in))) <= 0)
|
||||
return -1;
|
||||
|
||||
if (read == 5 && strncmp("BADIP", in, 5) == 0) {
|
||||
errx(3, "Not recognized by server. "
|
||||
"Has it been restarted? Aborting");
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
outlen = sizeof(out);
|
||||
inlen = read;
|
||||
if (uncompress((uint8_t*)out, &outlen, (uint8_t*)in, inlen) != Z_OK)
|
||||
|
|
Loading…
Reference in New Issue