I have a weird problem.... My home network uses dnsmasq to provide DNS/dhcp. When i try to connect my phone via wifi, i get associated ok... also get IP+GW... BUT no DNS servers(!?). My previous phones (HTC Touch HD and Kaiser) never had this problem.
If i setup static IP, then all works ok.... So far i only have seen this problem at home, hence i believe it is dnsmasq related.
So... just wondering if anyone has come across a similar issue... or any ideas on how i can diagnose this. Haven't really done much diagnosing on Android yet, was hoping for a a few pointers.... Like how does Android handle DHCP... i am guessing it doesn't use the typical dhcpcd client
Well after looking at this closely, discovered the problem is not with DNS entries, but setting the default GW. The thing is that dhcpcd sees the default gw and via hooks script in /system/etc/dhcpcd/dhcpcd-hooks runs setprop.
Also looking at logcat i can see that it picks up the right default gw but still isn't setting it:
V/WifiStateTracker( 106): IP configuration: ipaddr 192.168.1.74 gateway 192.168.1.254 netmask 255.255.255.0 dns1 192.168.1.3 dns2 192.168.1.254 DHCP server 192.168.1.3 lease 86400 seconds
but no default gw is listed when i run 'ip route show'... The other crazy thing is, that my dhcp server sends extra static routes, and these show fine... even work as expected.
If i manually add the route it works fine.... Well... i am a Linux admin but my first real attempt at working on Android, so still learning my way around... I am guessing setprop is used my Android to set the route (and other settings) but haven't figured out why it has failed. Will look some more, any help would be appreciated.