[Dnsmasq-discuss] Possible Bug: DHCPV6 Does Not Make Lease Entry for DHCP CONFIRM

Simon Kelley simon at thekelleys.org.uk
Tue Oct 20 20:42:47 BST 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


Dnsmasq doesn't insert a DHCP lease into the database when it gets a
SOLICIT, that happens when it gets a REQUEST.

I think there are two things here. The first is that openWRT doesn't
keep the lease database in non-volatile storage. Dnsmasq really wants
the lease database to persist over  a reboot, and you're only seeing
this effect because it doesn't.

The second issue is the semantics of DHCPCONFIRM. RFC 3315 says

   Any responding servers will indicate whether those
   addresses are appropriate for the link to which the client is
   attached with the status in the Reply message it returns to the
   client.

My reading is that this is NOT a check that lease(s) exist, only that
the addresses are in the appropriate subnet, which they are in this
case. It's possible that I've mis-interpreted the intention of the RFC
here.

Cheers,

Simon.

On 18/10/15 06:09, Eric Luehrsen wrote:
> In using the latest OpenWRT 15.05 (C.C.) with DNSMASQ 2.73 is
> logging DHCP (v6) CONFIRM events with host names but not
> re-entering them into the lease file. (note, I also saw this late
> in 14.07 (B.B.) with DNSMASQ for that release so its not new.)
> 
> A way to catch this behavior is use (client) a Debian flavor with 
> Network-Manager driving the connections. The sever again OpenWRT
> with ODHCP removed and just DNSMASQ for all DNS/DHCP services 4/6.
> Upon its initial connection the client will make a DHCP (v6)
> SOLICIT. At this time, DNSMASQ will write a lease file entry just
> as one would expect like DHCP (v4). Then cause the router to reset.
> Upon reconnecting, the client will issue a DHCP CONFIRM: "just
> checking this is still mine," DNSMASQ logs the event in syslog, the
> host name is in syslog, but the host name is not in the lease
> file.
> 
> The lease file information appears to be used by DNSMASQ
> internally to prevent hashing into the same address for two
> clients. While unlikely with the advisable DHCP "constructor" of
> ::1000-::FFFF, this could result in conflicts if DNSMASQ receives
> multiple SIGUP's from other processes and no lease is found to
> prevent conflict. The lease files can also be used in third party
> scripts to establish host identification and provide access to
> semi-controlled resources. Such as, hotel or restaurant Internet
> using an authorized "receipt code" check with an on-router
> intercept website for gating to the world.
> 
> -Reboot Router -Sun Oct 18 00:35:07 2015 daemon.info 
> dnsmasq-dhcp[1811]: DHCPCONFIRM(br-lan) DUID -Sun Oct 18 00:35:07 
> 2015 daemon.info dnsmasq-dhcp[1811]: DHCPREPLY(br-lan) 
> fdc0:a828::XXXX DUID HOSTNAME -Sun Oct 18 00:35:07 2015
> daemon.info dnsmasq-dhcp[1811]: DHCPREPLY(br-lan)
> 2001:470:YYYY:YYYY::XXXX DUID HOSTNAME -No dhcpv6 lease file entry
> 
> (Note: It appears when Windows drops/looses a connection for more 
> than a second-ish, it will always SOLICIT and get entered into the 
> lease file.)
> 
> 
> ERIC
> 
> 
> 
> _______________________________________________ Dnsmasq-discuss 
> mailing list Dnsmasq-discuss at lists.thekelleys.org.uk 
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBCAAGBQJWJpk2AAoJEBXN2mrhkTWi2BoP/Ro63bizqZSw6+Uwsul8Q138
qpulewPCbE8uvu3t7bumuVF3g9u6rhgKUHRBvIYvN41ASsBN2xyLWiKa0Nsz1ztA
2XRjKBooZANgXgu45cYe04QTLQYyzc69aOMUJ/gst3x74fJIUEQ1duMLCM8cFFcA
2CtFEU9fv/SPQnmQb8xgZr1hSCmuKesN0yuhMIIVjSlMbO4opwEH1zkNWiNBYC98
BFUfSEHwnAbGiJPq60++aWLvHObYqmFn9i9KOyiHjPUvtyVKpp+1vzrGrjuYbWve
J+k31dYda2bxHhyJWD6/Nrk55C2TttVpEhZ0q7N7bUwFazkSCv+tP46uOE0U+ZHB
Isl6CCaHNJVyMgJdNmp00yJU6ofxNxAvtPR24jAvleOBwFOuEczZN2yoLwmsJ05P
+Bfy8B1PI4jIjxoVxR15oBIMuIxYUHWsu2b0EtEO/lj+zpvXRMEbW2k+t8/Y4lGD
+Q85fk8fR+fFbcFZNdBed0ZO72iEh9zDOIvA0HJTmoXqx89B1b7lqYAtwRFq1lom
jNQ+0/7Z/sgINUcz37EAqaiTnuMx+jFbApkrGqXp9d+q7V2IpxLhrAwSpIWN5pyx
rQdT5zSL8wpBOQpoEdXekgJx4WUBvnLSK/ppVLANJBScA4tUinJwrmp/bzi7ZEG6
oLZsaK14dMKV3OGEAxBc
=i73C
-----END PGP SIGNATURE-----



More information about the Dnsmasq-discuss mailing list