else
ia_na_len = sizeof(ia_na);
memcpy(ia_na.iaid, ifia->iaid, sizeof(ia_na.iaid));
+ /* RFC 8415 21.4 and 21.21 state that T1 and T2 should be zero.
+ * An RFC compliant server MUST ignore them anyway. */
ia_na.t1 = 0;
ia_na.t2 = 0;
COPYIN(ifia->ia_type, &ia_na, ia_na_len);
continue;
if (ap->ia_type == D6_OPTION_IA_PD) {
#ifndef SMALL
- struct dhcp6_pd_addr pdp;
+ struct dhcp6_pd_addr pdp = {
+ .prefix_len = ap->prefix_len,
+ /*
+ * RFC 8415 21.22 states that the
+ * valid and preferred lifetimes sent by
+ * the client SHOULD be zero and MUST
+ * be ignored by the server.
+ */
+ };
- pdp.pltime = htonl(ap->prefix_pltime);
- pdp.vltime = htonl(ap->prefix_vltime);
- pdp.prefix_len = ap->prefix_len;
/* pdp.prefix is not aligned, so copy it in. */
memcpy(&pdp.prefix, &ap->prefix, sizeof(pdp.prefix));
COPYIN(D6_OPTION_IAPREFIX, &pdp, sizeof(pdp));
}
#endif
} else {
- struct dhcp6_ia_addr ia;
+ struct dhcp6_ia_addr ia = {
+ .addr = ap->addr,
+ /*
+ * RFC 8415 21.6 states that the
+ * valid and preferred lifetimes sent by
+ * the client SHOULD be zero and MUST
+ * be ignored by the server.
+ */
+ };
- ia.addr = ap->addr;
- ia.pltime = htonl(ap->prefix_pltime);
- ia.vltime = htonl(ap->prefix_vltime);
COPYIN(D6_OPTION_IA_ADDR, &ia, sizeof(ia));
ia_na_len = (uint16_t)
(ia_na_len + sizeof(o) + sizeof(ia));
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd February 24, 2022
+.Dd August 29, 2022
.Dt DHCPCD.CONF 5
.Os
.Sh NAME
This is on by default, but is documented here in the case where it is disabled
globally but needs to be enabled for one interface.
.It Ic leasetime Ar seconds
-Request a lease time of
+Request DHCP a lease time of
.Ar seconds .
.Ar -1
represents an infinite lease time.
.Nm dhcpcd
does not request any lease time and leaves it in the hands of the
DHCP server.
+It is not possible to request a DHCPv6 lease time as this is not RFC compliant.
+See RFC 8415 21.4, 21.6, 21.21 and 21.22.
.It Ic link_rcvbuf Ar size
Override the size of the link receive buffer from the kernel default.
While