Skip to content

feat(dhcpv4): answer DHCPINFORM regardless of pool coverage (RFC 2131 §4.3.5)#12

Merged
1456055067 merged 2 commits into
mainfrom
feat/inform-gating
Jul 7, 2026
Merged

feat(dhcpv4): answer DHCPINFORM regardless of pool coverage (RFC 2131 §4.3.5)#12
1456055067 merged 2 commits into
mainfrom
feat/inform-gating

Conversation

@1456055067

Copy link
Copy Markdown

What

DHCPINFORM was answered only when the client's address fell inside a configured range, so an authoritative server stayed silent for on-link clients whose address isn't in any pool (static hosts, out-of-pool addresses). RFC 2131 §4.3.5 says the server responds to INFORM with the client's local configuration regardless of pools.

Change

In plugins/message-type, drop the range requirement from the INFORM arm. An authoritative network now always answers INFORM:

  • options come from the range containing the client's address if there is one,
  • otherwise from class / interface-derived local config (collect_opts(&empty, classes)populate_opts still fills subnet mask / router / broadcast from the interface and any PRL-requested configured options).

Unchanged invariants: yiaddr = 0, no lease time (opt 51) — the path uses populate_opts, not populate_opts_lease. The authoritative gate stays (non-authoritative networks intentionally ignore INFORM for multi-server coexistence).

Tests

There were no INFORM tests before. Adds three message-type unit tests:

  • test_inform_in_range_acks — in-range → ACK, yiaddr 0, no lease time
  • test_inform_out_of_range_still_acks — on-link but out-of-pool → ACK (the relaxed behavior; previously suppressed)
  • test_inform_non_authoritative_ignored — non-authoritative → NoResponse (gating unchanged)

cargo fmt + clippy -D warnings clean.

Closes roadmap item #3 in docs/rfc_compliance.md.

… §4.3.5)

INFORM was answered only when the client's address fell inside a configured
range, so an authoritative server stayed silent for on-link clients outside
any pool. RFC 2131 §4.3.5 says the server returns the client's local
configuration regardless of pools.

Drop the range requirement: an authoritative network now always answers
INFORM, using the matching range's options when the address is in one and
otherwise class / interface-derived local config. yiaddr stays 0 and no lease
time is added (unchanged). Non-authoritative networks still ignore INFORM.

Adds message-type unit tests (in-range ACK, out-of-range ACK, non-authoritative
ignored) and updates docs/rfc_compliance.md.
The INFORM arm returns early, bypassing the shared-tail DROP-class check, so
a client the operator classed DROP (meant to be silenced) would receive an
INFORM ACK. Repeat the DROP check inside the INFORM arm before responding.
This also fixes the pre-existing in-range INFORM DROP bypass. Adds a test.
@1456055067 1456055067 merged commit b4d055d into main Jul 7, 2026
10 checks passed
@1456055067 1456055067 deleted the feat/inform-gating branch July 7, 2026 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant