When a DHCP session is started (using autoboot or a command-line `dhcp net0'), check whether the new setting use-cached (DHCP option 175.178) is TRUE; if so, skip DHCP and rely on currently registered settings. This lets one combine a static IP with autoboot. Before checking the use-cached setting, call a weak get_cached_dhcpack() hook that can be implemented by particular builds of gPXE supporting some fashion of retrieving a cached DHCPACK packet. If one is available, it is registered as an options source, and then either that packet's option 175.178 or the user's prior manual use-cached setting can allow skipping duplicate DHCP. Using cached packets is not the default because DHCP servers are often configured to give gPXE different options than they give a vendor PXE client; in order to break the infinite loop of PXE chaining, one would need to load a gPXE with an embedded image that does something more than autoboot. Signed-off-by: Marty Connor <mdc@etherboot.org>tags/v1.0.0-rc1
|
||
16 | 16 |
|
17 | 17 |
|
18 | 18 |
|
19 |
|
|
19 | 20 |
|
20 | 21 |
|
21 | 22 |
|
|
||
332 | 333 |
|
333 | 334 |
|
334 | 335 |
|
336 |
|
|
337 |
|
|
338 |
|
|
339 |
|
|
340 |
|
|
341 |
|
|
342 |
|
|
343 |
|
|
344 |
|
|
345 |
|
|
335 | 346 |
|
336 | 347 |
|
337 | 348 |
|
|
||
615 | 626 |
|
616 | 627 |
|
617 | 628 |
|
629 |
|
|
630 |
|
|
631 |
|
|
632 |
|
|
633 |
|
|
634 |
|
|
635 |
|
|
636 |
|
|
618 | 637 |
|
|
||
1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
|
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
|
52 |
|
|
53 |
|
|
54 |
|
|
55 |
|
|
56 |
|
|
57 |
|
|
58 |
|
|
59 |
|
|
60 |
|
|
61 |
|
|
62 |
|
|
63 |
|
|
64 |
|
|
65 |
|
|
66 |
|
|
67 |
|
|
68 |
|
|
69 |
|
|
70 |
|
|
71 |
|
|
72 |
|
|
73 |
|
|
74 |
|
|
75 |
|
|
76 |
|
|
||
110 | 110 |
|
111 | 111 |
|
112 | 112 |
|
113 |
|
|
114 |
|
|
115 |
|
|
116 |
|
|
117 |
|
|
118 |
|
|
119 |
|
|
120 |
|
|
113 | 121 |
|
114 | 122 |
|
115 | 123 |
|
|
||
1237 | 1245 |
|
1238 | 1246 |
|
1239 | 1247 |
|
1240 |
|
|
1248 |
|
|
1241 | 1249 |
|
1242 | 1250 |
|
1243 | 1251 |
|
1244 | 1252 |
|
1253 |
|
|
1254 |
|
|
1255 |
|
|
1256 |
|
|
1257 |
|
|
1245 | 1258 |
|
1246 | 1259 |
|
1247 | 1260 |
|
1248 | 1261 |
|
1249 | 1262 |
|
1263 |
|
|
1264 |
|
|
1265 |
|
|
1266 |
|
|
1267 |
|
|
1268 |
|
|
1269 |
|
|
1250 | 1270 |
|
1251 | 1271 |
|
1252 | 1272 |
|
|
||
55 | 55 |
|
56 | 56 |
|
57 | 57 |
|
58 |
|
|
58 |
|
|
59 |
|
|
59 | 60 |
|
61 |
|
|
62 |
|
|
63 |
|
|
64 |
|
|
60 | 65 |
|
61 | 66 |
|
62 | 67 |
|