New: XDA launches forum for app developers. Discuss coding, tools, marketing, and more.
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
Nemphys
Old
#1  
Member - OP
Thanks Meter 2
Posts: 74
Join Date: Jun 2007
Default BUG: DNS not flushing properly. Can our developers do something before Google?

The problem on every Nexus One (or Android) build so far, is that everytime one switches between WiFi and 3g or vise versa, the DNS cache is not flushed. This could cause various problems. In my case, when I connect to our corporate WiFi, the exchange mail server resolves to a local ip address, eg 10.x.x.x. When I turn WiFi off and connect to 3g, the dns entry is not flushed, and therefore the mail client just times out trying to connect to the non reachable private ip.
There is already a bug report about this, but I was wondering if our gurus here could fix this anytime soon, since Google doesn't seem to care much (the report is over 2 months old).
 
serialtoon
Old
#2  
serialtoon's Avatar
Senior Member
Thanks Meter 45
Posts: 725
Join Date: May 2006
Location: Long Beach, CA
There is an application in the market that flushes out the cache. It think its called "Cache Cleaner".
Current Device(s)
[B]Too many to list and keep up with [B]
isr@droid Old
#3  
Guest
Thanks Meter
Posts: n/a
this is my solution

add this script to gscript lite

netprop net.dns1 8.8.8.8
netprop net.dns2 8.8.4.4
 
shmigao
Old
#4  
shmigao's Avatar
Senior Member
Thanks Meter 74
Posts: 1,356
Join Date: Sep 2009
Location: Shanghai
Quote:
Originally Posted by isr@droid View Post
this is my solution

add this script to gscript lite

netprop net.dns1 8.8.8.8
netprop net.dns2 8.8.4.4
the app IP Manager could also be used

i have two IP profiles (home & office) and every time i leave either one of the two locations, i switch here (e.g. at home i need the private IP address, at office i need the assigned IP address, in both cases I want to have DNS1 8.8.8.8 and DNS2 8.8.4.4

more profiles can be set up, according to the requirement
Phone: HTC One X
Tablet: Galaxy Tab 10.1 (GT-P7500 / p4)

Legacy devices
Tablet: Galaxy Tab
Phone: Nexus One
Phone: G1
 
tamarian
Old
#5  
Senior Member
Thanks Meter 44
Posts: 277
Join Date: Jan 2010
Quote:
Originally Posted by isr@droid View Post
this is my solution

add this script to gscript lite

netprop net.dns1 8.8.8.8
netprop net.dns2 8.8.4.4

What is netprop? Can't find it on CM5.0.4.1. Is it a command line tool?
 
grainysand
Old
#6  
Senior Member
Thanks Meter 9
Posts: 698
Join Date: Dec 2009
Yeah, this has been bothering the tit out of me. When I used APNdroid, it was pretty terrible and I had to fiddle with wifi, plane mode, etc just to get EDGE back on.

I recall not having that problem when using Cyanogen's ROM, though. Maybe he's fixed it?
isr@droid Old
#7  
Guest
Thanks Meter
Posts: n/a
Quote:
Originally Posted by tamarian View Post
What is netprop? Can't find it on CM5.0.4.1. Is it a command line tool?
sorry ^^
setprop


XDA PORTAL POSTS

MicrowaveTimePicker Brings 4.2 TimePicker to 2.1+ Devices

It’s frustrating to see slick new features that you can’t use when … more

What’s Possible with CASUAL & How to Make Your Own CASUAL – XDA Developer TV

XDA Elite Recognized Developer AdamOutler is known … more

Pearl Chen to Talk NFC Development at XDA:DevCon 2013

From HTML to LEDs or Android to Arduino, Hardware Hacking is a pastime of many people … more

Avoid Framework Bootloops on Xperias Running Jelly Bean

If you’re a Sony device owner running a stock Android Jelly Bean firmware and … more