[1411] in Kerberos

home help back first fref pref prev next nref lref last post

Re: Kerberos and two ethernet ports

daemon@ATHENA.MIT.EDU (Viktor Dukhovni)
Wed May 29 14:37:10 1991

Date: 24 May 91 21:07:57 GMT
From: viktor@shearson.com (Viktor Dukhovni)
To: kerberos@shelby.Stanford.EDU

galina@watson.ibm.com (Galina Kofman)_ writes:

>In send_to_kdc.c after the socket was obtained add:

>    if ( loc_host_addr == 0 ) /* static u_long loc_host_addr = 0 initially */ {
>        if ( (loc_host_addr = gethostid()) == 0) {
				^^^^^^^
			This is not terribly likely to return
			an IP address.  On systems without a harware ID
			the default hostid may be based on the IP address,
			but these tend to also have sethostid(),  which
			may be used by the sysadmin to set any other value.


	To bind to the primary address one must

	char name[MAXHOSTNAMELEN];
	struct hostent *hp;
	gethostname(name,MAXHOSTNAMELEN);
	if ( (hp=gethostbyname(name)) == NULL ) {
		/* error */
		...
	}
	bcopy(hp->h_addr,&loc_host_addr,sizeof(loc_host_addr));
--
        Viktor Dukhovni <viktor@shearson.com>       : ARPA
                <...!uunet!shearson.com!viktor>     : UUCP
        388 Greenwich St., 11th floor, NY, NY 10013 : US-Post
                +1-(212)-464-3793                   : VOICE

home help back first fref pref prev next nref lref last post