]> git.ipfire.org Git - thirdparty/openwrt.git/commit
scripts: dhcpv6: harmonize IAID between IA_NA and IA_PD requests 23758/head
authorShine <4c.fce2@proton.me>
Fri, 12 Jun 2026 14:27:28 +0000 (16:27 +0200)
committerRobert Marko <robimarko@gmail.com>
Wed, 24 Jun 2026 11:34:32 +0000 (13:34 +0200)
commitf08cd5ce5d66d76fa6e282d6e3f29bab9cdf8023
treef575c8358cfec1d5b6b88ae2e7ccf50575add3d1
parenta7a715e11af8b00a49adcec83d945e67abe89dc6
scripts: dhcpv6: harmonize IAID between IA_NA and IA_PD requests

For DHCPv6 address requests (IA_NA), odhcp6c currently uses the first eight
digits of the i/f name's MD5 hash as IAID.

In case of DHCPv6-PD, however, odhcp6c expects the IAID to be specified
explicitly for the IA_PD(s) requested, otherwise it will start counting the
IAID from "1" up for each "-P" argument.

As OpenWrt only requests a single IA_PD per interface, make sure to pass
the identical IAID for IA_PD as is used for IA_NA, unless a custom IAID
was explicitly specified in the i/f configuration.

This prevents regressions with ISPs that expect an IA_PD request to come
from the same IAID+DUID combination as the IA_NA request.

In addition, add some validation of the "reqprefix" value, in order to
catch most cases that would otherwise result in netifd or odhcp6c
malfunction.

Signed-off-by: Shine <4c.fce2@proton.me>
Link: https://github.com/openwrt/openwrt/pull/23758
Signed-off-by: Robert Marko <robimarko@gmail.com>
package/network/ipv6/odhcp6c/files/dhcpv6.sh