lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Split DNS for multihomed setup


From: Mark Lvov
Subject: [lwip-users] Split DNS for multihomed setup
Date: Sat, 16 Aug 2014 01:26:09 +0400

Hello,

I am using raw API, my system has two distinct network interfaces and
there is a requirement, that (TCP) connections to certain remote
addresses are made through certain network interfaces.

Furtermore, the destinations, that we must connect to might be
specified as domain names, that obviously need resolving. The problem
is, certain destinations must only be resolved via DNS queries, that
are made through a particular network interface. For example, consider
a situation, when we have a PPP netif and an ethernet netif (that is
on a "local" network) and we need to connect to "foo.local" via
ethernet netif. We obviously must make sure, that the DNS query is
made through the ethernet interface. Hope, that makes sense.

Now, I've looked through the DNS implementation and I see that there
are basically two obstacles:
* there is no way to specify, which interface the queries should go
through (the pcb is bound to IP_ADDR_ANY without any way to override
it)
* the "resolver cache" (dns_table) obviously does not consider which
interface the entry belongs to

I am intentionally mentioning "interface" all throughout, but it can
be substituted for "source address", since those are equivalent in
this context.

What is the best way to tackle this problem? Perhaps I should attempt
to patch the dns implementation to add the "source address" argument
to the relevant functions and make the entries dns_table aware of the
source address of the query (falling back to IP_ADDR_ANY if source
address is not specified)? Is there any other way to do this?

Thanks,
Mark



reply via email to

[Prev in Thread] Current Thread [Next in Thread]