Commit 6eee006
authored
feat(dhcp): include the host's IPv6 DNS resolvers in the agent's DHCP config (#2686)
## Summary
The dual-stack `DhcpConfig` field `carbide_nameservers_v6` landed in
#2672, but nothing fills it — `from_forge_dhcp_config` and the agent's
config builders are still IPv4-only. This has the agent populate it from
the DPU's `ServiceAddresses` (which already holds both families):
- A `split_nameservers_by_family` helper splits the nameservers once,
used at both DHCP-config build sites (the gRPC control path and the
on-disk config path) so they can't diverge.
- `from_forge_dhcp_config` / `build_server_config` thread the IPv6 set
through into the config.
- The IPv4 DHCPv4 option-6 path is unchanged; the IPv6 set stays inert
until a delivery channel (DHCPv6 / RA) consumes it.
Tests cover `from_forge_dhcp_config` populating the field and the family
split.
Implements #2640. Part of the #2628 epic (dual-stack DNS resolver
advertisement).
> **Reworked onto current main.** The original version stacked on #2685
(Task 1), now closed as superseded by #2672 — which already added the
proto/model fields this PR builds on. So this PR is now just the
agent-population step.
Draft pending review.
Signed-off-by: Chet Nichols III <chetn@nvidia.com>1 parent 813a69c commit 6eee006
3 files changed
Lines changed: 67 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| 74 | + | |
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
141 | 156 | | |
142 | 157 | | |
143 | 158 | | |
| |||
1066 | 1081 | | |
1067 | 1082 | | |
1068 | 1083 | | |
1069 | | - | |
1070 | | - | |
1071 | | - | |
1072 | | - | |
1073 | | - | |
1074 | | - | |
1075 | | - | |
1076 | | - | |
| 1084 | + | |
1077 | 1085 | | |
1078 | 1086 | | |
1079 | 1087 | | |
| |||
1095 | 1103 | | |
1096 | 1104 | | |
1097 | 1105 | | |
| 1106 | + | |
1098 | 1107 | | |
1099 | 1108 | | |
1100 | 1109 | | |
| |||
1471 | 1480 | | |
1472 | 1481 | | |
1473 | 1482 | | |
1474 | | - | |
1475 | | - | |
1476 | | - | |
1477 | | - | |
1478 | | - | |
1479 | | - | |
1480 | | - | |
1481 | | - | |
1482 | | - | |
1483 | | - | |
1484 | | - | |
1485 | | - | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
1486 | 1487 | | |
1487 | 1488 | | |
1488 | 1489 | | |
| |||
1517 | 1518 | | |
1518 | 1519 | | |
1519 | 1520 | | |
1520 | | - | |
1521 | | - | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
1522 | 1528 | | |
1523 | 1529 | | |
1524 | 1530 | | |
| |||
1923 | 1929 | | |
1924 | 1930 | | |
1925 | 1931 | | |
1926 | | - | |
| 1932 | + | |
1927 | 1933 | | |
1928 | 1934 | | |
1929 | 1935 | | |
| |||
3305 | 3311 | | |
3306 | 3312 | | |
3307 | 3313 | | |
| 3314 | + | |
| 3315 | + | |
| 3316 | + | |
| 3317 | + | |
| 3318 | + | |
| 3319 | + | |
| 3320 | + | |
| 3321 | + | |
| 3322 | + | |
| 3323 | + | |
| 3324 | + | |
| 3325 | + | |
| 3326 | + | |
| 3327 | + | |
| 3328 | + | |
| 3329 | + | |
| 3330 | + | |
| 3331 | + | |
| 3332 | + | |
| 3333 | + | |
| 3334 | + | |
| 3335 | + | |
| 3336 | + | |
| 3337 | + | |
| 3338 | + | |
3308 | 3339 | | |
3309 | 3340 | | |
3310 | 3341 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
| 104 | + | |
103 | 105 | | |
104 | 106 | | |
105 | 107 | | |
| |||
344 | 346 | | |
345 | 347 | | |
346 | 348 | | |
| 349 | + | |
347 | 350 | | |
348 | 351 | | |
349 | 352 | | |
| |||
434 | 437 | | |
435 | 438 | | |
436 | 439 | | |
437 | | - | |
| 440 | + | |
438 | 441 | | |
439 | 442 | | |
440 | 443 | | |
| 444 | + | |
441 | 445 | | |
442 | 446 | | |
443 | 447 | | |
444 | 448 | | |
445 | 449 | | |
446 | 450 | | |
447 | 451 | | |
| 452 | + | |
448 | 453 | | |
449 | 454 | | |
450 | 455 | | |
451 | 456 | | |
452 | 457 | | |
453 | 458 | | |
454 | 459 | | |
| 460 | + | |
455 | 461 | | |
456 | 462 | | |
457 | 463 | | |
| |||
484 | 490 | | |
485 | 491 | | |
486 | 492 | | |
| 493 | + | |
487 | 494 | | |
488 | 495 | | |
489 | 496 | | |
490 | 497 | | |
491 | 498 | | |
492 | 499 | | |
| 500 | + | |
493 | 501 | | |
494 | 502 | | |
495 | 503 | | |
| |||
0 commit comments