Stop client if server is restarted

This commit is contained in:
Erik Ekman 2008-09-09 19:37:51 +00:00
parent 63d65bb30e
commit 8eccbf097a
2 changed files with 7 additions and 0 deletions

View File

@ -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

View File

@ -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)