Skip to content

ubus: fix truncated field in DHCPv6 lease query#383

Merged
openwrt-bot merged 1 commit intoopenwrt:masterfrom
mmmspatz:mspatz/fix_ubus_lease_query
Mar 16, 2026
Merged

ubus: fix truncated field in DHCPv6 lease query#383
openwrt-bot merged 1 commit intoopenwrt:masterfrom
mmmspatz:mspatz/fix_ubus_lease_query

Conversation

@mmmspatz
Copy link
Copy Markdown
Contributor

The assigned_subnet_id field in struct dhcpv6_lease is uint32_t, not uint16_t.

Unlikely to matter in practice, since the number of meaningful bits in the field is (assignment size) - (interface assignemt size), so largest typically be 64 - 48 = 16. But it is possible to assign a /32 to an interface in openwrt.

The assigned_subnet_id field in struct dhcpv6_lease is uint32_t, not
uint16_t.

Unlikely to matter in practice, since the number of meaningful bits in
the field is (assignment size) - (interface assignemt size), so largest
typically be 64 - 48 = 16. But it is possible to assign a /32 to an
interface in openwrt.

Signed-off-by: Mark H. Spatz <mark.h.spatz@gmail.com>
Link: openwrt#383
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
@Noltari Noltari force-pushed the mspatz/fix_ubus_lease_query branch from 51c3cad to b960d4c Compare March 16, 2026 17:46
@openwrt-bot openwrt-bot merged commit b960d4c into openwrt:master Mar 16, 2026
9 checks passed
@Noltari
Copy link
Copy Markdown
Member

Noltari commented Mar 16, 2026

Merged, thanks @mmmspatz!

Noltari pushed a commit to Noltari/odhcpd that referenced this pull request Mar 16, 2026
The assigned_subnet_id field in struct dhcpv6_lease is uint32_t, not
uint16_t.

Unlikely to matter in practice, since the number of meaningful bits in
the field is (assignment size) - (interface assignemt size), so largest
typically be 64 - 48 = 16. But it is possible to assign a /32 to an
interface in openwrt.

(cherry picked from commit b960d4c)
Signed-off-by: Mark H. Spatz <mark.h.spatz@gmail.com>
Link: openwrt#383
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants