statefiles: use dirfd in dhcpv6_ia_write_statefile()
authorDavid Härdeman <[email protected]>
Fri, 7 Nov 2025 16:53:22 +0000 (17:53 +0100)
committerÁlvaro Fernández Rojas <[email protected]>
Tue, 11 Nov 2025 07:30:00 +0000 (08:30 +0100)
commit310846535d06b1fe71d9ad3815c3dfaa1c65003e
treee93deb97254a5215e65a757f182d116f98ce153b
parent50c35c3195f242282a0068e1ec5f0521ffd5cea6
statefiles: use dirfd in dhcpv6_ia_write_statefile()

Similarly to the hostsfile, use a dirfd to keep track of the directory
where the statefile is stored, simplifying the code a bit and avoiding
some more allocations.

Signed-off-by: David Härdeman <[email protected]>
Link: https://github.com/openwrt/odhcpd/pull/302
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
src/config.c
src/odhcpd.h
src/statefiles.c