[Dnsmasq-discuss] dnsmasq-2.61 not responding to ipv6 router solicitation requests

Marien Zwart marien.zwart at gmail.com
Mon May 21 14:14:44 BST 2012


Hi,

Running dnsmasq-2.61 as just a DNS server and ipv6 router advertisement
daemon, with the following configuration:

domain-needed
bogus-priv
no-dhcp-interface=sixxs
no-dhcp-interface=eth1
no-dhcp-interface=eth0
domain=marienz.net
dhcp-range=2001:610:788::, slaac
enable-ra

it sends periodic router advertisement packets just fine, according to
syslog:

dnsmasq-dhcp[14136]: RTR-ADVERT(br0) 2001:610:788::

and other systems on the network eventually respond to those, but their
router solicitation packets seem to be getting ignored (network traffic
capture did see them arrive on the host dnsmasq runs on, but no response
is sent).

I think this is at least partially caused by a bug in dnsmasq.c: the
main loop only calls icmp6_packet if daemon->dhcp6 is non-NULL, but
dnsmasq should respond to icmp6 packets if it's providing just RA
services (no dhcpv6) too. That is: I think dnsmasq.c needs something
like this:

diff --git a/src/dnsmasq.c b/src/dnsmasq.c
index 1b951f0..11c2d73 100644
--- a/src/dnsmasq.c
+++ b/src/dnsmasq.c
@@ -849,14 +849,11 @@ int main (int argc, char **argv)
 	}
 
 #ifdef HAVE_DHCP6
-      if (daemon->dhcp6)
-	{
-	  if (FD_ISSET(daemon->dhcp6fd, &rset))
-	    dhcp6_packet(now);
+      if (daemon->dhcp6 && FD_ISSET(daemon->dhcp6fd, &rset))
+	  dhcp6_packet(now);
 
-	  if (daemon->ra_contexts && FD_ISSET(daemon->icmp6fd, &rset))
-	    icmp6_packet();
-	}
+      if (daemon->ra_contexts && FD_ISSET(daemon->icmp6fd, &rset))
+	  icmp6_packet();
 #endif
 
 #  ifdef HAVE_SCRIPT

This brings this bit of code in line with other code in dnsmasq.c that
touches dhcp6fd and icmp6fd. I've also confirmed daemon->dhcp6 really is
NULL in my problematic dnsmasq instance.

Unfortunately this has not yet made my dnsmasq respond to router
solicitation requests. Is there some known problem I might be hitting?

Thanks,

-- 
Marien Zwart
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20120521/941083cf/attachment.pgp>


More information about the Dnsmasq-discuss mailing list