[baylisa] Re: wtf: hostid gives '0' as a hostid

Robi rob.markovic at gmail.com
Sat Feb 16 23:27:36 PST 2008


In Linux it seems to take the first network adapter, which is usually lo.
But here's something a bit odd.

I have a system with many IPs bound to lo:x where x is 0-100+. There's also
eth0 with it's own aliasing, but in this case, hostid reports an IP that is
bound to lo:4 for some reason.

And to correct a typo, the f7 in the third line down should be 7f as from
the 2nd line. Should read 7f 00 00 01 which then correctly makes 127.0.0.1.

After glancing at the /etc/hosts file, the reason is the hostname is set to
that IP. Or rather the IP is associated with that hostname.

In any case, a poor "key" to base the security of some application on. Let's
call it practical obscurity.

Good work Phil, looks like that's what the hostid code does as you said.

-- Rob


> > 127.0.0.1 in network-endian hexadecimal.
> >
> > 007f 0100
> >
> > f7 00 00 01
> >
> > 127 . 0 . 0 . 1
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.baylisa.org/pipermail/baylisa/attachments/20080216/b46c9dd4/attachment.html>


More information about the Baylisa mailing list