tis 2009-09-15 klockan 23:59 +1200 skrev Amos Jeffries:
> + if ( (tmp_sock = socket(PF_INET6, SOCK_STREAM, IPPROTO_TCP))
> >= 0 &&
> + setsockopt(tmp_sock, SOL_IP, IP_TRANSPARENT, (char
> *)&tos, sizeof(int)) == 0 &&
> + bind(tmp_sock, (struct sockaddr*)&tmp_ip6, sizeof(struct
> sockaddr_in6)) == 0 ) {
> +
> + debugs(3, 3, "IPv6 TPROXY support detected. Using.");
> + shutdown(tmp_sock, SHUT_RDWR);
> + return true;
Hmm... that shutdown should be a close(). If not you'll lose the
filedescriptor.
Applies to the other uses of shutdown() there as well I think.
shutdown(SHUT_RDWR) is not a synonym for close().
Regards
Henrik
Received on Tue Sep 15 2009 - 21:44:01 MDT
This archive was generated by hypermail 2.2.0 : Wed Sep 16 2009 - 12:00:05 MDT