On Tue, 2015-10-20 at 14:14 +1100, Craig McQueen wrote:
> The following patches are related to the captive portal code originally 
> provided by Alexandre Chataignon. The first patch is a copy of the 
> original patch, provided again as a reference. The 3 following patches 
> are improvements I made following a review of Alexandre's patch, to 
> improve the following:
> 
> * Check that the query first question is for an A record, and only 
> send an A record if so.
> * Handle the case of a query containing additional records (don't 
> send a corrupt response).
> * For queries from a loopack IP address, don't return the captive 
> address, but do the normal DNS handling.

So this is a special case of a special case.

The general case to solve is to add local entries to ConnMan's resolver,
i.e. entries in /etc/hosts should be supported. As should the hostname
handled by systemd-hostnamed. A and AAAA records as well as the IP4.ARPA
and IP6.ARPA domains need to be added automatically.

After this comes the first special case: what, if any, should be
configured for hosts in the tethered network. The second special case is
the wildcard catch-all for the portal case specified above. This seems
to point to a wildcard entry in the file mapping all other names. I'm
not very sure how both of these cases will work out in the end.

Plan B for handling this special case is to set up unbound or similar,
start ConnMan with --nodnsproxy while adding the IP address of the
tethering interface to FallbackNameservers. The nameservers in
FallbackNameservers will be sent out via DHCP if ConnMan is not proxying
DNS requests. In this particular special case there were no uplink
connections so the DHCP server IP address is always the same - minus any
bugs of course.

Plan C is to use mDNS from Avahi, but that seems to be outside of the
original solution unless short names are always used.

Cheers,

        Patrik

_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Reply via email to