1
0
mirror of https://github.com/yarrick/iodine.git synced 2024-11-26 15:06:04 +03:00

some cleanup

This commit is contained in:
Bjorn Andersson 2007-07-12 15:18:34 +00:00
parent 0b9a532bbe
commit e5ee739537

View File

@ -163,11 +163,11 @@ tunnel_dns(int tun_fd, int dns_fd)
/* Version greeting, compare and send ack/nak */ /* Version greeting, compare and send ack/nak */
if (read > 4) { if (read > 4) {
/* Received V + 32bits version */ /* Received V + 32bits version */
version = (((unpacked[0] & 0xff) << 24) | version = (((unpacked[0] & 0xff) << 24) |
((unpacked[1] & 0xff) << 16) | ((unpacked[1] & 0xff) << 16) |
((unpacked[2] & 0xff) << 8) | ((unpacked[2] & 0xff) << 8) |
((unpacked[3] & 0xff))); ((unpacked[3] & 0xff)));
}
if (version == VERSION) { if (version == VERSION) {
userid = find_available_user(); userid = find_available_user();
@ -187,9 +187,6 @@ tunnel_dns(int tun_fd, int dns_fd)
} else { } else {
send_version_response(dns_fd, VERSION_NACK, VERSION, &dummy); send_version_response(dns_fd, VERSION_NACK, VERSION, &dummy);
} }
} else {
send_version_response(dns_fd, VERSION_NACK, VERSION, &dummy);
}
} else if(in[0] == 'L' || in[0] == 'l') { } else if(in[0] == 'L' || in[0] == 'l') {
read = unpack_data(unpacked, sizeof(unpacked), &(in[1]), read - 1, b32); read = unpack_data(unpacked, sizeof(unpacked), &(in[1]), read - 1, b32);
/* Login phase, handle auth */ /* Login phase, handle auth */