some cleanup

This commit is contained in:
Bjorn Andersson 2007-07-12 15:18:34 +00:00 committed by Erik Ekman
parent 060c2e3faa
commit 89232bcaa6

View file

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