From root@angui.sh  Wed Nov 29 11:11:12 2000
Return-Path: <root@angui.sh>
Received: from angui.sh (40bc2767.dsl.flashcom.net [64.188.39.103])
	by hub.freebsd.org (Postfix) with ESMTP id E764137B400
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 29 Nov 2000 11:11:11 -0800 (PST)
Received: (from root@localhost)
	by angui.sh (8.11.1/8.11.1) id eATJ8gh23012;
	Wed, 29 Nov 2000 11:08:42 -0800 (PST)
	(envelope-from root)
Message-Id: <200011291908.eATJ8gh23012@angui.sh>
Date: Wed, 29 Nov 2000 11:08:42 -0800 (PST)
From: "angui.sh admin" <root@angui.sh>
Reply-To: root@angui.sh
To: FreeBSD-gnats-submit@freebsd.org
Subject: 'talk' not doing right thing <Synopsis of the problem (one line)>
X-Send-Pr-Version: 3.2

>Number:         23178
>Category:       bin
>Synopsis:       'talk' not doing right thing
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 29 11:20:00 PST 2000
>Closed-Date:    Sat Jun 09 18:53:50 GMT 2007
>Last-Modified:  Sat Jun 09 18:53:50 GMT 2007
>Originator:     angui.sh admin
>Release:        FreeBSD 4.2-STABLE i386
>Organization:
>Environment:

	FreeBSD 4.2, dual p3 650's. two nic cards, one for my domain
	and external interface, one for my internal network and i'm
	using xinetd and nat

	

>Description:

	when using xinetd to bind ntalkd to the internal interfaces
	(10.0.0.1 and 127.0.0.1) talk refuses to work properly. this
	is because in the talk source, it does a gethostname call to
	look up the hostname of the machine, and gets my external
	interface name/ip and attempts to talk to/through that. since
	ntalkd isn't bound to that interface, of course it fails.
	A local user to local user talk should use the loopback!
	

>How-To-Repeat:

	Just have a box with it's own hostname/domain on the external
	interface, watch the gethostname call return that. that
	name will be used later when the talk program tries to do
	its udp sending and recieving....
	

>Fix:

	Edit the 'get_names.c' file, change the section where it has:

if (*cp == '\0') {
                /* this is a local to local talk */
                his_name = argv[1];
                his_machine_name = my_machine_name;

change that to:

if (*cp == '\0') {
                /* this is a local to local talk */
                his_name = argv[1];
                his_machine_name = "localhost";
                my_machine_name  = "localhost";
	



>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: jedgar 
Responsible-Changed-When: Thu Nov 30 08:32:20 PST 2000 
Responsible-Changed-Why:  
Misfiled PR 

http://www.freebsd.org/cgi/query-pr.cgi?pr=23178 
State-Changed-From-To: open->patched 
State-Changed-By: bms 
State-Changed-When: Mon Jun 14 22:34:23 GMT 2004 
State-Changed-Why:  
Committed to -CURRENT with cleanup, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=23178 
State-Changed-From-To: patched->closed 
State-Changed-By: gavin 
State-Changed-When: Sat Jun 9 18:53:35 UTC 2007 
State-Changed-Why:  
Fixed in all supported FreeBSD releases 

http://www.freebsd.org/cgi/query-pr.cgi?pr=23178 
>Unformatted:
