[Dnsmasq-discuss] send_ra never sending Router Advertisements

Kaspar Schleiser kaspar at schleiser.de
Mon Sep 24 15:47:42 BST 2012


Hi,

Current dnsmasq (tried from 2.62 onwards) doesn't reply to router
solicits. I think I found the problem.

This is from radv.c from HEAD (commit 35239a30):

-------
205   parm.other = 0;
206   parm.found_context = 0;

parm.found_context gets initialized here.

207   parm.if_name = iface_name;
208   parm.first = 1;
209
210   /* set tag with name == interface */
211   iface_id.net = iface_name;
212   iface_id.next = NULL;
213   parm.tags = &iface_id;
214
215   for (context = daemon->ra_contexts; context; context = context->next)
216     {
217       context->flags &= ~CONTEXT_RA_DONE;
218       context->netid.next = &context->netid;
219     }
220
221   if (!iface_enumerate(AF_INET6, &parm, add_prefixes) ||
222       !parm.found_context)
223     return;
----

If parm.found_context is zero, the function just returns.
iface_enumerate is the only function called, and it doesn't touch
param.found_context. So send_ra always returns.

Removing the "!parm.found_context" from that if-statement in line 222
makes dnsmasq answer to RS again.

Am I missing something?

Cheers,
Kaspar



More information about the Dnsmasq-discuss mailing list