<feed xmlns='http://www.w3.org/2005/Atom'>
<title>odhcpd/src, branch master</title>
<subtitle>OpenWrt DHCP Server</subtitle>
<id>https://git.openwrt.org/project/odhcpd/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/project/odhcpd/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/odhcpd/'/>
<updated>2026-11-30T21:07:42Z</updated>
<entry>
<title>ubus: key the lease and prefix lists by interface</title>
<updated>2026-11-30T21:07:42Z</updated>
<author>
<name>David Härdeman</name>
</author>
<published>2026-11-30T15:14:41Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/odhcpd/commit/?id=d81c530cac648d4b35c6b63c902cc8f9f94cc90b'/>
<id>urn:sha1:d81c530cac648d4b35c6b63c902cc8f9f94cc90b</id>
<content type='text'>
The ipv4leases/ipv6leases replies list the leases in a "device" table
keyed by network device, and ipv6ra in an "interfaces" table which is
also keyed by device, while "interface" means the logical interface
everywhere else (UCI, netifd, the lease events, add_lease).

Key all three by logical interface in an "interface" table instead,
with the device as "device" in each entry and the prefixes of ipv6ra in
"prefixes". This changes the replies: consumers (LuCI, unbound) need to
be updated.

Also use consistent names elsewhere: the interface names of static
leases are no longer called "ifaces"/"ifnames" ("ifname" means the
device), a log message printed the device as the interface, and the
README called the "ifname" option a "physical network interface".

Signed-off-by: David Härdeman &lt;david@hardeman.nu&gt;
Link: https://github.com/openwrt/odhcpd/pull/464
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>ubus: add the interface and device names to the DHCPv4 lease events</title>
<updated>2026-11-30T21:07:42Z</updated>
<author>
<name>David Härdeman</name>
</author>
<published>2026-11-17T12:32:20Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/odhcpd/commit/?id=e92b949f41fd88c8eb47585f1b0f0a6df8d0a5b1'/>
<id>urn:sha1:e92b949f41fd88c8eb47585f1b0f0a6df8d0a5b1</id>
<content type='text'>
The "interface" parameter of the dhcp.lease4/release4/expire4
notifications is the name of the network device (e.g. "br-lan"), not
the logical interface name (e.g. "lan") which it means elsewhere in
OpenWrt (e.g. netifd's ubus API). As consumers typically are configured
by logical interface, they had to map the device name back themselves.

Use the logical interface name for "interface" and add the device name
as "device", as netifd does.

Also fix the README: these are notifications to the subscribers of the
dhcp object, not broadcasts, so they are observed with
"ubus subscribe dhcp" rather than "ubus listen dhcp", their parameters
were listed incorrectly, and dhcp.lease4 is also sent when a lease is
renewed.

Signed-off-by: David Härdeman &lt;david@hardeman.nu&gt;
Link: https://github.com/openwrt/odhcpd/pull/464
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>ubus: report the UCI section of static leases</title>
<updated>2026-11-30T15:09:40Z</updated>
<author>
<name>David Härdeman</name>
</author>
<published>2026-11-16T15:51:44Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/odhcpd/commit/?id=ecdbbf5e044a8d47444909995eb8d409d1a7caf0'/>
<id>urn:sha1:ecdbbf5e044a8d47444909995eb8d409d1a7caf0</id>
<content type='text'>
The "static" flag of the ipv4leases/ipv6leases replies says that a lease
matched a static lease config, but not which one. Remember the name of
the UCI host section a static lease config was created from, and report
it as "uci-section". LuCI can use it later to offer editing the right
section. Static leases added via the add_lease ubus method have no UCI
section, so the field is omitted for them.

Anonymous UCI sections are named after their position in the file, so
the name of a section can change on reload while its config (which is
matched by MAC/DUID) stays the same; update the name in that case.

Signed-off-by: David Härdeman &lt;david@hardeman.nu&gt;
Link: https://github.com/openwrt/odhcpd/pull/463
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>statefiles: only write the files that changed</title>
<updated>2026-11-30T15:09:13Z</updated>
<author>
<name>David Härdeman</name>
</author>
<published>2026-11-30T12:48:16Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/odhcpd/commit/?id=4a867c7dd8cf092b9b1cb24b08729820103f7190'/>
<id>urn:sha1:4a867c7dd8cf092b9b1cb24b08729820103f7190</id>
<content type='text'>
Every state write rewrites the lease files of all interfaces, and the
hosts files of all interfaces whenever a global hash of the hosts
entries changed. State writes are triggered by flags that two timers
poll every second (DHCPv6) and every five seconds (DHCPv4).

Mark the interfaces whose state changed with statefiles_dirty(), and
write only their files: the lease file, and the hosts file if a hash of
its entries (and of the interface's domain, which the old hash missed)
changed. Writes no longer depend on the expiry timers: the first change
is written at once, further changes at most every two seconds.
dhcp.hosts.update is only sent if a hosts file was written or removed.

A DHCPv4 DISCOVER or DHCPv6 Solicit only marks the interface if it
unbinds a lease, as unbound leases aren't in the state files; otherwise
it would use up the immediate write before the client's request.

Signed-off-by: David Härdeman &lt;david@hardeman.nu&gt;
Link: https://github.com/openwrt/odhcpd/pull/462
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>config: replace the leasefile option by leasedir</title>
<updated>2026-11-30T15:09:13Z</updated>
<author>
<name>David Härdeman</name>
</author>
<published>2026-11-29T19:42:46Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/odhcpd/commit/?id=859abe03c122ec923ec46a797c66ba1676c5d219'/>
<id>urn:sha1:859abe03c122ec923ec46a797c66ba1676c5d219</id>
<content type='text'>
The leases are available via ubus, so nothing outside odhcpd needs to
read the lease file anymore, and it can become internal to odhcpd.

Replace the leasefile option by leasedir, a directory for one lease file
per interface (odhcpd.leases.&lt;interface&gt;). The files are rewritten
whenever the leases change, and moved or removed with the directory or
the interface, like the hosts files. Without leasedir, no lease files
are written, as without leasefile before. The format of the entries is
unchanged for now.

Signed-off-by: David Härdeman &lt;david@hardeman.nu&gt;
Link: https://github.com/openwrt/odhcpd/pull/462
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>config: remove the leasetrigger option</title>
<updated>2026-11-30T15:09:13Z</updated>
<author>
<name>David Härdeman</name>
</author>
<published>2026-11-29T19:42:46Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/odhcpd/commit/?id=da83e467bf3e3194687c4e231b1bd099c2476083'/>
<id>urn:sha1:da83e467bf3e3194687c4e231b1bd099c2476083</id>
<content type='text'>
The lease trigger only tells DNS servers that the hosts files have
changed. They can use the dhcp.hosts.update ubus event or watch the
hosts directory instead, so remove it.

Signed-off-by: David Härdeman &lt;david@hardeman.nu&gt;
Link: https://github.com/openwrt/odhcpd/pull/462
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>config: always log a log level change</title>
<updated>2026-11-30T10:38:01Z</updated>
<author>
<name>David Härdeman</name>
</author>
<published>2026-11-27T00:29:00Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/odhcpd/commit/?id=bcb92c5c8ea9258199c9c21dc90703d8978724df'/>
<id>urn:sha1:bcb92c5c8ea9258199c9c21dc90703d8978724df</id>
<content type='text'>
"Log level set to" is a notice, so a change to a level below 5 wasn't logged. Log it with at
least notice level before applying the new level, and drop the stray newline. Also fix the
default in the README (4, not 6).

Signed-off-by: David Härdeman &lt;david@hardeman.nu&gt;
Link: https://github.com/openwrt/odhcpd/pull/460
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>config: reset removed global options on reload</title>
<updated>2026-11-30T10:38:01Z</updated>
<author>
<name>David Härdeman</name>
</author>
<published>2026-11-26T23:59:49Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/odhcpd/commit/?id=8ed91e4c5dfbbab5b308c04f76d97ff5a35ff811'/>
<id>urn:sha1:8ed91e4c5dfbbab5b308c04f76d97ff5a35ff811</id>
<content type='text'>
Options of the odhcpd section and dhcp_default_duid were only overwritten when present, so
removing one from the config kept its old value until a restart. Removing leasefile even
left the bare file name behind, so the lease file was written to the working directory.
Reset them to their defaults before loading the config, and apply them once all odhcpd
sections are read.

Signed-off-by: David Härdeman &lt;david@hardeman.nu&gt;
Link: https://github.com/openwrt/odhcpd/pull/460
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>config: remove the enable_tz option</title>
<updated>2026-11-30T10:38:01Z</updated>
<author>
<name>David Härdeman</name>
</author>
<published>2026-11-26T23:44:42Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/odhcpd/commit/?id=e4b10863efc0c4dd2dbd1f17539154114b84471e'/>
<id>urn:sha1:e4b10863efc0c4dd2dbd1f17539154114b84471e</id>
<content type='text'>
The time zone is only sent to clients that request it, so a global switch for it isn't
needed. This also paves the way for custom DHCPv4/v6 options, which will be able to
control this (and any other option) per interface or host.

Signed-off-by: David Härdeman &lt;david@hardeman.nu&gt;
Link: https://github.com/openwrt/odhcpd/pull/460
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>config: don't rewrite spaces in the time zone</title>
<updated>2026-11-30T10:38:01Z</updated>
<author>
<name>David Härdeman</name>
</author>
<published>2026-11-26T23:07:21Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/odhcpd/commit/?id=d108076b7444ff001add48cdb5bb72019ba9e31e'/>
<id>urn:sha1:d108076b7444ff001add48cdb5bb72019ba9e31e</id>
<content type='text'>
sanitize_tz_string() replaced spaces with underscores, because LuCI used to write TZDB names
with spaces (e.g. "America/New York"). LuCI writes underscores since 2025, and OpenWrt
migrates kept configs on upgrade since openwrt/openwrt@54c7ad8d8a ("base-files: uci-defaults:
migrate time zonename on upgrade"), so pass the strings on as they are.

Signed-off-by: David Härdeman &lt;david@hardeman.nu&gt;
Link: https://github.com/openwrt/odhcpd/pull/460
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
</feed>
