Search code examples
androiddnsadbtcpdumpdhcp

Android gingerbread DHCP 119 setprop not working


I am try to set custom DNS suffix (yahoo.com in my case) using adb command

setprop net.dns.search yahoo.com

I verified it using

getprop net.dns.search

and it returns yahoo.com

However, when I type music in my browser and run tcpdump in the adb, here is what I get.

enter image description here enter image description here

So, the query is actually "music.yahoo.com", but somehow, the android default browser says page not found

Why is it not going to music.yahoo.com when the actual query is that?

When I set the suffix to google.com and enter finance in my browser. It just opens google.com and not finance.google.com

Do anyone have any idea of what could be wrong? Any help is much appreciated!!


Solution

  • You are confusing something maybe. net.dns.search adds suffix to searched host names. You pass music, it will append yahoo.com. Ok, you got music.yahoo.com in DNS, but programs thinks it is music.

    In HTTP, you specify which host you connect to. And there will be Host: music. Not music.yahoo.com. Server receives music and don't know for which virtual server it should be. Thus it uses default site as fallback.

    Is there reason you want it to behave this way? It is intended to save your own time by setting your local domain. But it will not work well on public internet.