lixuewei / rt-n56u

Automatically exported from code.google.com/p/rt-n56u
0 stars 0 forks source link

missing /etc/gai.conf #1309

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
RE: 
http://www.linksysinfo.org/index.php?threads/how-to-force-to-use-ipv4-instead-of
-ipv6-for-certain-domains.70297/#post-249262

toolchain: uClibc 0.9.32: Implement tiny /etc/gai.conf

Implement simplest variant of /etc/gai.conf to control IPv6/IPv4 names order
resolution. Unfortunately, it incompatible with glibc due it(glibc) hasn't
simple switch, just longest prefix matching list - consumes too much code.

Default names resolution behavior remains old - IPv6 first, IPv4 second.
To change it to IPv4 first, IPv6 second, create /etc/gai.conf containing
single line:

 precedence ipv4

Note: Manual file creation of gai.conf and copy to /etc/gai.conf.
Problem question, will this remain after reboot or future FW update.

Original issue reported on code.google.com by leandro.ong@gmail.com on 11 Aug 2014 at 10:20

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Solved. I added in firewall script
cat << EOF > /etc/gai.conf
precedence ipv4
EOF

Output sample:
/opt/home/admin # nslookup wl500g-repo.googlecode.com
Server:    127.0.0.1
Address 1: 127.0.0.1 localhost.localdomain

Name:      wl500g-repo.googlecode.com
Address 1: 173.194.72.82 tf-in-f82.1e100.net
Address 2: 2404:6800:4008:c04::52
/opt/home/admin #

Original comment by leandro.ong@gmail.com on 11 Aug 2014 at 11:43

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I think it's easier to set 'strict-order' in dnsmasq configuration.

Original comment by d...@soulblader.com on 11 Aug 2014 at 5:03