diff options
| author | David Härdeman | 2025-11-23 23:32:22 +0000 |
|---|---|---|
| committer | Álvaro Fernández Rojas | 2025-11-30 16:00:21 +0000 |
| commit | 9ae348c07ce058dfc125a7036bb662a76d93e64f (patch) | |
| tree | 5f49dd0f207a54640c3e1bed256b86fa20632303 | |
| parent | 1fe60e14e4687cf076d34c2577a9c84b3b9ba460 (diff) | |
dhcpv6: remove OAF_TENTATIVE
The flag was only set in two places, and never used. Its meaning was
also essentially the inverse of OAF_BOUND.
Signed-off-by: David Härdeman <david@hardeman.nu>
Link: https://github.com/openwrt/odhcpd/pull/331
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
| -rw-r--r-- | src/dhcpv6-ia.c | 6 | ||||
| -rw-r--r-- | src/odhcpd.h | 7 |
2 files changed, 4 insertions, 9 deletions
diff --git a/src/dhcpv6-ia.c b/src/dhcpv6-ia.c index 1b17cf7..6f3852d 100644 --- a/src/dhcpv6-ia.c +++ b/src/dhcpv6-ia.c @@ -1226,12 +1226,9 @@ proceed: ia_response_len = build_ia(buf, buflen, status, ia, a, iface, hdr->msg_type == DHCPV6_MSG_REBIND ? false : true); - /* Was only a solicitation: mark binding for removal */ + /* Was only a solicitation: mark binding for removal in 60 seconds */ if (assigned && hdr->msg_type == DHCPV6_MSG_SOLICIT && !rapid_commit) { a->flags &= ~OAF_BOUND; - a->flags |= OAF_TENTATIVE; - - /* Keep tentative assignment around for 60 seconds */ a->valid_until = now + 60; } else if (assigned && @@ -1248,7 +1245,6 @@ proceed: } } a->accept_fr_nonce = accept_reconf; - a->flags &= ~OAF_TENTATIVE; a->flags |= OAF_BOUND; apply_lease(a, true); } else if (!assigned) { diff --git a/src/odhcpd.h b/src/odhcpd.h index d7a32bb..3fb3acc 100644 --- a/src/odhcpd.h +++ b/src/odhcpd.h @@ -190,10 +190,9 @@ enum odhcpd_mode { enum odhcpd_assignment_flags { - OAF_TENTATIVE = (1 << 0), - OAF_BOUND = (1 << 1), - OAF_DHCPV6_NA = (1 << 2), - OAF_DHCPV6_PD = (1 << 3), + OAF_BOUND = (1 << 0), + OAF_DHCPV6_NA = (1 << 1), + OAF_DHCPV6_PD = (1 << 2), }; /* 2-byte type + 128-byte DUID, RFC8415, §11.1 */ |