Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Jan 2003 22:44:08 -0500
From:      "Matthew Emmerton" <matt@gsicomp.on.ca>
To:        "Konstantin Borovik" <sysop@fb.homeunix.org>, <freebsd-questions@FreeBSD.ORG>
Subject:   Re: command host does not check /etc/hosts.
Message-ID:  <00b601c2b2da$5fa1f760$1200a8c0@gsicomp.on.ca>
References:  <004501c2b2d9$976940a0$0300000a@winxp>

next in thread | previous in thread | raw e-mail | index | archive | help
> Hi,
>
> Command host does not check /etc/hosts file. Is it a bug or normal
behavior?
> My sendmail could not deliver mail to localhost. I had to comment the
> following lines in the config file.
>
> # Resolve map (to check if a host exists in check_mail)
> #Kresolve host -a<OKR> -T<TEMP>
> #C{ResOk}OKR
>
> My system:
>
> uname -a
>
> FreeBSD fb.homeunix.org 4.7-STABLE FreeBSD 4.7-STABLE #1: Tue Dec 31
> 21:29:27 MST 2002     bkn@fb.homeunix.org:/usr/obj/usr/src/sys/BSD  i386
>
> I did some investigation:
>
> ******************************** start
> ****************************************************
>
> bkn@fb /home/bkn> ktrace host localhost
> localhost.ab.hsia.telus.net has address 10.166.205.185
>
> ********************************** end
> ***************************************************
>
> ******************************** start
> ****************************************************
> bkn@fb /home/bkn> kdump | less
>
> ......
>   3032 host     CALL  readlink(0x18120194,0xbfbff770,0x3f)
>   3032 host     NAMI  "/etc/malloc.conf"
>   3032 host     RET   readlink -1 errno 2 No such file or directory
>   3032 host     CALL  mmap(0,0x1000,0x3,0x1002,0xffffffff,0,0,0)
>   3032 host     RET   mmap 403931136/0x18138000
>   3032 host     CALL  break(0x8896000)
>   3032 host     RET   break 0
>   3032 host     CALL  break(0x8897000)
>   3032 host     RET   break 0
>   3032 host     CALL  gettimeofday(0xbfbff3c8,0)
>   3032 host     RET   gettimeofday 0
>   3032 host     CALL  getpid
>   3032 host     RET   getpid 3032/0xbd8
>   3032 host     CALL  break(0x8898000)
>   3032 host     RET   break 0
>   3032 host     CALL  open(0x807bca2,0,0x1b6)
>   3032 host     NAMI  "/etc/resolv.conf"
>   3032 host     RET   open 3
>   3032 host     CALL  fstat(0x3,0xbfbff2c0)
>   3032 host     RET   fstat 0
>   3032 host     CALL  break(0x889c000)
>   3032 host     RET   break 0
>   3032 host     CALL  read(0x3,0x8898000,0x4000)
>   3032 host     GIO   fd 3 read 132 bytes
>        "search ab.hsia.telus.net
>         nameserver 216.123.198.243
>         nameserver 209.115.152.130
>         nameserver 209.115.131.51
>         nameserver 209.115.152.150
>        "
>   3032 host     RET   read 132/0x84
>   3032 host     CALL  read(0x3,0x8898000,0x4000)
>   3032 host     GIO   fd 3 read 0 bytes
>        ""
>   3032 host     RET   read 0
>   3032 host     CALL  close(0x3)
>   3032 host     RET   close 0
>   3032 host     CALL  socket(0x2,0x2,0)
>   3032 host     RET   socket 3
>   3032 host     CALL  connect(0x3,0x8893770,0x10)
>   3032 host     RET   connect 0
>   3032 host     CALL  sendto(0x3,0xbfbef410,0x2d,0,0,0)
>   3032 host     GIO   fd 3 wrote 45 bytes
>        "\^P\M-%\^A\0\0\^A\0\0\0\0\0\0
> localhost\^Bab\^Dhsia\^Etelus\^Cnet\0\0\^A\0\^A"
>   3032 host     RET   sendto 45/0x2d
> ......
> ********************************** end
> ***************************************************
>
> Have a nice day.
>
> Konstaintin
>
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
>

Why does "localhost" resolve to 10.166.205.185?

localhost should always resolve to 127.0.0.1.  If it doesn't, something is
severely broken with your (or your ISP's) DNS setup.

--
Matt Emmerton


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00b601c2b2da$5fa1f760$1200a8c0>