Artifacts Associated With Ticket 1962217fffffffff
Ticket change [0003bd0c2e] (rid 119249) by nobody on 2008-05-12 07:06:36:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
I have a problem to resolv reverse DNS in tcl interpreter compiled with treads in my server socket code. If host is available i reverse DNS zone it is ok but if host is not available tcl returns last position from /etc/hosts file. This situation is only on tcl compiled with threads. I check 8.5.2, 8.4.15, 8.4.18 No threaded interpreter: logger: Opening SMTP connection from 172.16.17.222 Threaded interpreter: logger: Opening SMTP connection from osiolek Last position from my /etc/hosts 172.16.55.11 osiolek fconfigure returns bad hostname Sample code: if {[catch {set RemoteName [lindex [fconfigure $channel -peername] 1]} err]} { logger "Can't read client name" after 0 "close $channel" return } Linux distributions: SLES 9, SLES 10, Ubuntu [email protected] - foundin initialized to: "None"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "49. Threading"
- title initialized to: "dns resolver problem"
- type initialized to: "Bug"
Ticket change [ed786d5b7e] (rid 103886) by wapinski on 2008-05-20 04:55:40:
- icomment:
Logged In: YES user_id=2091947 Originator: NO my observations: with nothreaded interpreter: set hostip [lindex [fconfigure $channel -peername] 0] returns client(host) IP set hostname [lindex [fconfigure $channel -peername] 1] returns client(host) NAME (from DNS or /etc/hosts) set hostport [lindex [fconfigure $channel -peername] 2] returns client(host) PORT but with threaded interpreter "fconfigure -peername" returns good client IP, NAME and PORT doesn't exists (!). Darek. [email protected]
- login: "wapinski"
- mimetype: "text/plain"
- username: "wapinski"
- icomment:
Ticket change [70941a55c4] (rid 100511) by dkf on 2008-05-20 15:16:11:
- icomment:
Logged In: YES user_id=79902 Originator: NO Looks like there's thread-safety problems in TclpGetHostByAddr when built under modern Linux. Should review to see if replacing with getaddrinfo (which is *supposed* to be thread-safe) is practical.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [72e46dc42e] (rid 104944) by dkf on 2008-05-20 15:16:12:
- assignee changed to: "andreas_kupries"
- foundin changed to: "obsolete: 8.5.2"
- priority changed to: "8"
- subsystem changed to: "27. Channel Types"
Ticket change [75acd0e64d] (rid 105427) by wapinski on 2008-05-26 18:35:21:
- icomment:
Logged In: YES user_id=2091947 Originator: NO Maybe problem is because gethostbyaddr_r return more than one error conditions: http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=/apis/tsghosta.htm " Error Conditions When the gethostbyaddr_r() function fails, h_errno (defined in <netdb.h>) can be set to: [HOST_NOT_FOUND] [NO_DATA] [NO_RECOVERY] [TRY_AGAIN] [EINVAL] " In TclpGetHostByAddr(const char *addr, int length, int type) in tclUnixCompat.c we have only NULL? If I reduce TclpGetHostByAddr() to: struct hostent * TclpGetHostByAddr( const char *addr, int length, int type) { return gethostbyaddr(addr, length, type); } everything is OK. But this is NOT answer. - login: "wapinski"
- mimetype: "text/plain"
- username: "wapinski"
- icomment:
Ticket change [0cf68843fa] (rid 114274) by dkf on 2012-05-18 00:08:39:
- assignee changed to: "rmax"
- closedate changed to: "2012-05-17T17:08:39"
- closer changed to: "dkf"
- icomment:
allow_comments - 1 Tcl 8.6 uses getaddrinfo() now which is documented as thread safe. (It also supports IPv6, which is why we switched to GAI.)
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Out of Date"
- status changed to: "Closed"
- username: "dkf"