All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] DNS resolv issue with localhost
@ 2011-07-04 22:42 Jigar SOLANKI
  2011-07-05 12:28 ` Jigar SOLANKI
  0 siblings, 1 reply; 4+ messages in thread
From: Jigar SOLANKI @ 2011-07-04 22:42 UTC (permalink / raw)
  To: buildroot

Hello all,

I have a LEON3 / XILINX Virtex / Buildroot Linux running on my fpga.

I have a weird issue with localhost :

When there is no default route, ping localhost works fine.
When I set a default route (route add default gw 1.2.3.4), ping localhost doesnt work anymore (but ping 127.0.0.1 still does).

I have checked my /etc/hosts and my /etc/network/interfaces, they are fine :

auto lo
iface lo inet loopback

hosts :
127.0.0.1 localhost


What am I missing ? 

Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] DNS resolv issue with localhost
  2011-07-04 22:42 [Buildroot] DNS resolv issue with localhost Jigar SOLANKI
@ 2011-07-05 12:28 ` Jigar SOLANKI
  2011-07-05 19:04   ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Jigar SOLANKI @ 2011-07-05 12:28 UTC (permalink / raw)
  To: buildroot

Problem SOLVED :
I was missing the nsswitch.conf file in /etc, so the resolv order was
wrong (nslookup localhost was requesting the dns server in
/etc/resolv.conf whereas it should have beeb /etc/hosts)
I just added a nsswitch.conf from an another correctly running linux.


Le 05/07/2011 00:42, Jigar SOLANKI a ?crit :
> Hello all,
> 
> I have a LEON3 / XILINX Virtex / Buildroot Linux running on my fpga.
> 
> I have a weird issue with localhost :
> 
> When there is no default route, ping localhost works fine.
> When I set a default route (route add default gw 1.2.3.4), ping localhost doesnt work anymore (but ping 127.0.0.1 still does).
> 
> I have checked my /etc/hosts and my /etc/network/interfaces, they are fine :
> 
> auto lo
> iface lo inet loopback
> 
> hosts :
> 127.0.0.1 localhost
> 
> 
> What am I missing ? 
> 
> Thanks.
> 
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot


-- 
Jigar SOLANKI

LaBRI - UMR 5800
Universit? Bordeaux 1
351 Cours de la Lib?ration
F-33405 Talence Cedex
Phone : (+33) 5 4000 24 87
Fax   : (+33) 5 4000 66 69

* Please do not print this e-mail unless it's really necessary *
---


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 554 bytes
Desc: OpenPGP digital signature
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20110705/851d329f/attachment.asc>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] DNS resolv issue with localhost
  2011-07-05 12:28 ` Jigar SOLANKI
@ 2011-07-05 19:04   ` Thomas Petazzoni
  2012-09-21  8:38     ` Lionel Orry
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2011-07-05 19:04 UTC (permalink / raw)
  To: buildroot

Le Tue, 05 Jul 2011 14:28:03 +0200,
Jigar SOLANKI <jigar.solanki@labri.fr> a ?crit :

> Problem SOLVED :
> I was missing the nsswitch.conf file in /etc, so the resolv order was
> wrong (nslookup localhost was requesting the dns server in
> /etc/resolv.conf whereas it should have beeb /etc/hosts)
> I just added a nsswitch.conf from an another correctly running linux.

So you're using a glibc-based system, right ? If so, maybe we should
add this nsswitch.conf file to the default Buildroot and make sure it
gets installed when a glibc toolchain is used.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] DNS resolv issue with localhost
  2011-07-05 19:04   ` Thomas Petazzoni
@ 2012-09-21  8:38     ` Lionel Orry
  0 siblings, 0 replies; 4+ messages in thread
From: Lionel Orry @ 2012-09-21  8:38 UTC (permalink / raw)
  To: buildroot

Thomas Petazzoni <thomas.petazzoni@...> writes:

> 
> Le Tue, 05 Jul 2011 14:28:03 +0200,
> Jigar SOLANKI <jigar.solanki <at> labri.fr> a ?crit :
> 
> > Problem SOLVED :
> > I was missing the nsswitch.conf file in /etc, so the resolv order was
> > wrong (nslookup localhost was requesting the dns server in
> > /etc/resolv.conf whereas it should have beeb /etc/hosts)
> > I just added a nsswitch.conf from an another correctly running linux.
> 
> So you're using a glibc-based system, right ? If so, maybe we should
> add this nsswitch.conf file to the default Buildroot and make sure it
> gets installed when a glibc toolchain is used.
> 
> Thomas

I just ran into the exact same problem, and here is a links to a LFS manual
stating the problem as well :
http://archive.linuxfromscratch.org/lfs-museum/4.1/LFS-BOOK-4.1-HTML/chapter06/glibc.html#AEN2505

So yes I think that should be good to ship nsswitch.conf.

For information, I used the nsswitch.conf file found in my external toolchain
sysroot that was re-created under buildroot, in my case it was at

<buildroot_path>/output/host/usr/sh4-unknown-linux-gnu/sysroot/etc/nsswitch.conf

Kind regards,
Lionel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-09-21  8:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-04 22:42 [Buildroot] DNS resolv issue with localhost Jigar SOLANKI
2011-07-05 12:28 ` Jigar SOLANKI
2011-07-05 19:04   ` Thomas Petazzoni
2012-09-21  8:38     ` Lionel Orry

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.