Project

General

Profile

Bug #6543

Some leases do not show up in DHCPv6 Lease status

Added by Bruce Simpson over 3 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Category:
DHCP (IPv6)
Target version:
Start date:
06/27/2016
Due date:
% Done:

100%

Estimated time:
Affected Version:
All
Affected Architecture:

Description

I have noticed from time-to-time that some IPv6 devices have taken a DHCPv6 dynamic lease, and do not show up in the lease status. These leases are active & present in the /var/dhcpd/var/db/dhcpd6.leases file, but do not show up in the GUI.

The issue seems to affect mobile devices e.g. LiteOn based phones. These may have unexpected values in the address family and/or timestamp fields of the DUID.

Associated revisions

Revision 1f9c2cb6 (diff)
Added by Renato Botelho over 3 years ago

Improve patterns to read dhcpd6.leases to prevent leases containing '}' in ia-na line not showing up. It fixes #6543

Revision 8f867225 (diff)
Added by Renato Botelho over 3 years ago

Improve patterns to read dhcpd6.leases to prevent leases containing '}' in ia-na line not showing up. It fixes #6543

History

#1 Updated by Axel Taferner over 3 years ago

I've experienced this same issue, in my case it is not limited to mobile devices. I've had this happen with a Macbook Air and Mac Mini recently, and other devices previously.

#2 Updated by Chris Buechler over 3 years ago

Need some examples, what's shown in dhcpd6.leases that doesn't show on the status page?

#3 Updated by Bruce Simpson over 3 years ago

I'd have to get back to you on that -- e.g. putting a watch on the file contents. There have clearly been leases missing and it's happened more than once. It may be a race condition somewhere. (I'm pivoting to looking at Duo again, so I will be down and dirty with the SG 4860 soon.)

#4 Updated by Axel Taferner over 3 years ago

I like to statically assign DHCPv6 addresses to some devices on my network. But finding the DUID can sometimes be challenging. An easy way that sometimes worked would be to look at the DHCPv6 leases and convert an entry there to a static mapping. But as this bug states, sometimes DHCPv6 leases don't appear in the GUI.

Right now I can provide an example of such a case. It's a Mac Mini. It has a DHCPv6 assigned address. It shows up in /var/dhcpd/var/db/dhcpd6.leases but it does not show up in the GUI's Status / DHCPv6 Leases page.

As a side note, perhaps this is a separate bug, this is currently the only DHCPv6 assigned IP address that does not have a static mapping yet. Incidentally as can be seen in the attached screenshot of the status page, all the statically mapped clients are shown as "offline" even though several of them are online with their statically mapped DHCPv6 IP address.

#5 Updated by Chris Buechler over 3 years ago

Axel: could you email me an unsanitized copy of your dhcpd6.leases? cmb at pfsense dot org. Nothing immediately sticks out, and none of my systems are missing any. I'm sure it's something in one of those two awk patterns, but it's not clear what that might be.

#6 Updated by Axel Taferner over 3 years ago

I sent the email last week, I hope you received it.

#7 Updated by Renato Botelho over 3 years ago

Axel Taferner wrote:

I sent the email last week, I hope you received it.

Hello Axel,

Can you also send it to me? renato at pfsense dot org?

#8 Updated by Chris Buechler over 3 years ago

  • Category set to DHCP (IPv6)
  • Status changed from New to Confirmed
  • Affected Version set to All

Forwarded it to you, Renato.

#9 Updated by Renato Botelho over 3 years ago

Pushed a fix on RELENG_2_3, 2.3.2 snapshots will be fine

#10 Updated by Renato Botelho over 3 years ago

  • Assignee set to Renato Botelho
  • Target version set to 2.3.2

#11 Updated by Renato Botelho over 3 years ago

  • Status changed from Confirmed to Feedback
  • % Done changed from 0 to 100

#12 Updated by Axel Taferner over 3 years ago

Awesome. Should I open another bug for the problem I mentioned where hosts who have statically assigned dhcpv6 leases are shown as offline on the "Status / DHCPv6 Leases" even when they are online/active? Or was this resolved by this fix also?

#13 Updated by Renato Botelho over 3 years ago

Axel Taferner wrote:

Awesome. Should I open another bug for the problem I mentioned where hosts who have statically assigned dhcpv6 leases are shown as offline on the "Status / DHCPv6 Leases" even when they are online/active? Or was this resolved by this fix also?

Do you confirm the fix worked for you?

The other issue should go to a separate bug, please

#14 Updated by Axel Taferner over 3 years ago

Sorry, I can't confirm if the fix worked for me as I'm not running the snapshots. I'll open another bug for the separate issue.

#15 Updated by Renato Botelho over 3 years ago

Axel Taferner wrote:

Sorry, I can't confirm if the fix worked for me as I'm not running the snapshots. I'll open another bug for the separate issue.

You can install the package "System Patches" and then apply following patch to you system:

https://github.com/pfsense/pfsense/commit/1f9c2cb696f493aaaa3512f29c080b7e422b24f2.patch

#16 Updated by Axel Taferner over 3 years ago

Renato Botelho wrote:

You can install the package "System Patches" and then apply following patch to you system:
https://github.com/pfsense/pfsense/commit/1f9c2cb696f493aaaa3512f29c080b7e422b24f2.patch

Done! Can confirm that it's working for me now with this patch applied. Thanks.

#17 Updated by Chris Buechler over 3 years ago

  • Status changed from Feedback to Resolved

works.

Whether systems show online or offline depends on whether the DHCPv6 leased IP is in the NDP cache. If the system hasn't actively used that IP to communicate with the Internet using the DHCPv6-assigned IP in a while (or at all), it will show up as offline.

Axel: Guessing the online/offline is working correctly in your case, as it's pretty straight forward code, it'd either all work or all not work. You're probably expecting to see systems online that aren't actually online using the DHCPv6-assigned IP. Check 'ndp -an' to confirm. If you see an active entry in 'ndp -an' and it shows offline on the DHCPv6 status page, then please open a new bug report with specifics. Guessing you'll just find they aren't in NDP.

Also available in: Atom PDF