[Dnsmasq-discuss] SUCCESS
Gene Czarcinski
gene at czarc.net
Tue Oct 16 14:28:22 BST 2012
On 10/16/2012 09:00 AM, Simon Kelley wrote:
> On 15/10/12 22:22, Gene Czarcinski wrote:
>
>> The address we have is going to be ff00::1:2 so checking the address
>> list against it is useless. Scanning daemon->if_names is still needed.
>> Also daemon->interfaces is lacking some info we need namely AF_INET or
>> AF_INET6 but it seems to me that it could easily be added.
>
>>
>> We need to go through daemon->interfaces to find the ip6 addresses
>> associated with the device name we have. Then, that address needs to be
>> compared with any IPv6 addresses specified in --listen-address.
>>
>> We could just do this check for dhcp6 ... would that break things?
>
> That looks close to correct. It's interesting to compare it with the
> DHCPv4 code, which checks the --listen-address parameter against the
> primary address of the arrival interface and if that fails against all
> of them.
>
> For IPv6, "primary address" is not a very useful concept, so the best
> solution is to compare the --listen-address parameter against all
> addresses of the arrival interface.
>>
>> Any favorite approaches: just dhcp6 .. or .. extra calling sequence
>> parameter/flag ... or ... a new, separate function? The last two are
>> the "safest".
>
> New code. the DHCPv4 check_listen_addrs() function is a good prototype.
>
> I'll see if I can produce something later today.
I have success!! Actually it is less code rather than more!
I need to clean things up a little but should have something really
soon! ... like, later today.
It turns out that iface_check() was not needed (mostly) and was causing
the problem. Testing for the if_names and if_addrs was a red herring
and a problem.
I replaced iface_check() with two additions to check both device
exclusion lists plus a few comments to explain some things and that is it!
Gene
More information about the Dnsmasq-discuss
mailing list