Skip to content

Extend DhcpConfig proto + model to carry IPv6 nameservers #2638

@chet

Description

@chet

Task 1 — Proto + model foundation (no dependencies)

Carry IPv6 DNS nameservers through the agent → dhcp-server DhcpConfig, in parallel with the existing IPv4 carbide_nameservers (which stays IPv4-only so the DHCPv4 path is untouched).

Files:

  • crates/dhcp-server/proto/dhcp_server_control.proto (corrected path — the proto lives under dhcp-server, not crates/rpc/proto)
  • crates/rpc-utils/src/dhcp.rs
  • crates/agent/src/dhcp_server_grpc_client.rs
  • crates/dhcp-server/src/grpc_server.rs

Changes

dhcp_server_control.proto — new field (field 4 / carbide_nameservers stays IPv4-only):

// IPv6 DNS server addresses as colon-notation strings (e.g. "2001:db8::1").
repeated string carbide_nameservers_v6 = 9;

rpc-utils/src/dhcp.rs — add pub carbide_nameservers_v6: Vec<Ipv6Addr> to DhcpConfig (+ Default).

agent/src/dhcp_server_grpc_client.rs — serialize carbide_nameservers_v6 as colon-notation strings in From<ModelDhcpConfig>.

dhcp-server/src/grpc_server.rs — parse the new field as Ipv6Addr in TryFrom<proto::DhcpConfig>; empty/absent → empty Vec (forward-compat with older agents).

Done when: DhcpConfig round-trips v6 nameservers end-to-end; existing DHCPv4 tests unchanged.

Note: this is plumbing ahead of a consumer — nothing reads carbide_nameservers_v6 until the delivery channel (#2644 / #1263) lands. It is a safe, self-contained prerequisite that removes a known data-loss point: the agent currently discards IPv6 nameservers it already has.

Part of #2628

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Verify

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions