Skip to content

DHCP6: use lease_type to key lease map in addition to iaid_duid#8492

Merged
AdSchellevis merged 2 commits intoopnsense:masterfrom
agoodkind:agoodkind/get-leases-fix
Apr 11, 2025
Merged

DHCP6: use lease_type to key lease map in addition to iaid_duid#8492
AdSchellevis merged 2 commits intoopnsense:masterfrom
agoodkind:agoodkind/get-leases-fix

Conversation

@agoodkind
Copy link
Copy Markdown
Contributor

Description

Currently, get_leases6 misreports clients that request an address and a prefix delegation. Adding the lease type to the map key prevents this.

Testing

Request an address and a PD from the same client (same DUID) and verify that the address appeared in the output of /api/dhcpv6/leases/searchLease/ and that the delegated prefix appeared in /api/dhcpv6/leases/searchPrefix/.

Fixes: #8472

@agoodkind
Copy link
Copy Markdown
Contributor Author

@AdSchellevis

Comment thread src/opnsense/scripts/dhcp/get_leases6.py Outdated
Co-authored-by: Ad Schellevis <AdSchellevis@users.noreply.github.com>
@agoodkind agoodkind requested a review from AdSchellevis April 10, 2025 18:06
@AdSchellevis AdSchellevis merged commit 02e5110 into opnsense:master Apr 11, 2025
@AdSchellevis
Copy link
Copy Markdown
Member

@agoodkind thanks!

@agoodkind
Copy link
Copy Markdown
Contributor Author

@agoodkind thanks!

No problem ☺️

fichtner pushed a commit that referenced this pull request Apr 22, 2025
…8492)

* dhcp6: key lease map by type in addition to duid

* Update src/opnsense/scripts/dhcp/get_leases6.py

Co-authored-by: Ad Schellevis <AdSchellevis@users.noreply.github.com>

---------

Co-authored-by: Ad Schellevis <AdSchellevis@users.noreply.github.com>
(cherry picked from commit 02e5110)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

DHCPv6 clients requesting both an address and a prefix delegation show partially incorrect in Leases tab

2 participants