When Internet connexion is absent, we spoof DNS entry and answer to all name request by koombook.lan / 192.168.2.1
This is quite handy but this lead to some issue. When connected to our AP, Android device got all name resolution resolve to koombook.lan, even when the device is 3G connected which is quite annoying for the end user.
Our device should then behave as when the device is connected to Internet : All connexion are redirect to our captive portal at the first time, then end-user can visit any website.
Before going too much into the technical stuff, I'd rather try to understand better your issue :
When name resolution fails, your device is not trying to resolve with secondary DNS (just realizing that thanks to dnsspoof, resolution is never failing)? Because having 2 Internet connection will give you 2 DNS servers and 2 default routes. From what I read Android devices may tend to go through best-signal connection.
So if you hit Koombook's dnsmasq and then its captive portal I don't see how you could go straight to Internet though your 3G... Therefor it's not much a DNS issue than a route one.
In the end, I don't really see any solution better than disabling unused connection.
Anyway, now you mention it, I don't see clear usage of dnsspoof, I may try to test disabling it. But I'm pretty sure it's there for a reason :D Just can't think of it.
When Internet connexion is absent, we spoof DNS entry and answer to all name request by koombook.lan / 192.168.2.1
This is quite handy but this lead to some issue. When connected to our AP, Android device got all name resolution resolve to koombook.lan, even when the device is 3G connected which is quite annoying for the end user.
Our device should then behave as when the device is connected to Internet : All connexion are redirect to our captive portal at the first time, then end-user can visit any website.
This PR should solve this issue