Greetings! And thanks again for your very helpful reports!
Here is the findorig() code in (uploaded) 7.1.4:
=============================================================================
int
lamnet_findorig(struct lamnode *lamnet, int nlamnet)
{
int i, j;
int nifaddr; /* # of interface addresses */
uint4 *ifaddr;
nifaddr = getifaddr(&ifaddr);
if (nifaddr < 0)
return(LAMERROR);
/*
* Loop over the host entries, comparing their addresses to
* our local host interface addresses.
*/
for (i = 0; i < nlamnet; ++i) {
/* Skip empty entries */
if (lamnet[i].lnd_nodeid == NOTNODEID)
continue;
if (inet_netof(lamnet[i].lnd_addr.sin_addr) == 127) {
free(ifaddr);
return(i);
}
for (j = 0; j < nifaddr; ++j) {
if (ifaddr[j] == lamnet[i].lnd_addr.sin_addr.s_addr) {
free(ifaddr);
return(i);
}
}
}
free(ifaddr);
errno = EINVAL;
return(LAMERROR);
}
=============================================================================
I think this should take care of it. Do you agree? If so, we can close
this one too, or tag it 7.1.2.
Take care,
Sergio Gelato <[email protected]> writes:
> * Camm Maguire [2012-04-09 08:57:11 -0400]:
>> Greetings, and thanks for your report! Is there a valid way lam could
>> work around this /etc/hosts breakage? The report in 316099 appears to
>> indicate that the problem has been resolved by never associating
>> 127.0.0.1 with the canonical name of the local host. Does this solve
>> the issue?
>
> LAM could for example treat any address in 127.0.0.0/8 as local. This
> conforms with RFC 3330 so there is a chance that it will be valid even
> for platforms other than Linux. I'm looking at the code for lamnet_findorig()
> in share/boot/lamnet.c and see that for now it just does a straight
> comparison of the 4-byte addresses; one could augment the test with a
> || (ifaddr[i]>>24 == 127 &&
> lamnet[i].lnd_addr.sin_addr.s_addr>>24 == 127)
> or equivalent (instead of shifting one can mask with 0xff000000 and compare
> to 0x7f000000).
>
> Failing this, one should at least document the issue in README.Debian.
> (Maybe debconf or postinst could detect the issue at installation time
> and present a warning note too. But it's probably simpler to just patch
> lamnet_findorig().)
>
> Since this is really a matter of integration within Debian, it may be worth
> discussing in a broader context than just this package. (I've noticed a
> similar issue with the autofs package, although in that case the effect
> is merely to force the use of loopback NFS mounts where bind mounts
> would do so the impact is less severe.) As indicated in 316099, the
> long-term goal should be not to list the local host name in /etc/hosts
> at all; the question is whether this can now be achieved without breaking
> anything. (Is GNOME 3 better behaved than its predecessors in this regard?)
>
>
>
>
>
--
Camm Maguire [email protected]
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]