dhcpv6: RFC4833 timezones
authorPaul Donald <[email protected]>
Wed, 22 Oct 2025 00:17:06 +0000 (02:17 +0200)
committerÁlvaro Fernández Rojas <[email protected]>
Wed, 22 Oct 2025 14:10:48 +0000 (16:10 +0200)
commit7956f4271b4efc23dbb9b88e82f1720eadb655a2
treeb288ed7e097c9f9f3b408f0a04e9442e05c63e3a
parent7000557cd8f6396b82cb35e0cdf9b72b18288fbc
dhcpv6: RFC4833 timezones

This implements RFC4833 - supplying timezone information to clients that
request them. Both forms are possible, when timezone is configured in
the uci system settings (the luci GUI saves both forms to the config).

e.g.
```
config system
option zonename 'America/Puerto Rico'
option timezone 'AST4'
```

There is also an odhcpd flag to disable their use, set in uci dhcp.

```
config odhcpd 'odhcpd'
option enable_tzdb '0'
```

Once enabled, the options, when requested, are sent:
NEW_POSIX_TIMEZONE 41 // 'AST4'
NEW_TZDB_TIMEZONE 42 // 'America/Puerto_Rico'

Wireshark disassemble of options sent to client:

```
...
Time Zone Database
    Option: Time Zone Database (42)
    Length: 19
    TZ-database: America/Puerto_Rico
Time Zone
    Option: Time Zone (41)
    Length: 4
    Time-zone: AST4
```

Signed-off-by: Paul Donald <[email protected]>
Link: https://github.com/openwrt/odhcpd/pull/284
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
README.md
src/config.c
src/dhcpv6.c
src/dhcpv6.h
src/odhcpd.h