|
@@ -94,18 +94,14 @@ static const unsigned char dhcpdiscover[] = {
|
94
|
94
|
#else
|
95
|
95
|
#define DHCPDISCOVER_PARAMS_PXE 0
|
96
|
96
|
#endif /* PXE_DHCP_STRICT */
|
97
|
|
-#ifdef DNS_RESOLVER
|
98
|
97
|
#define DHCPDISCOVER_PARAMS_DNS 1
|
99
|
|
-#else
|
100
|
|
-#define DHCPDISCOVER_PARAMS_DNS 0
|
101
|
|
-#endif /* DNS_RESOLVER */
|
102
|
98
|
( DHCPDISCOVER_PARAMS_BASE +
|
103
|
99
|
DHCPDISCOVER_PARAMS_PXE+
|
104
|
100
|
DHCPDISCOVER_PARAMS_DNS ),
|
105
|
101
|
RFC1533_NETMASK,
|
106
|
102
|
RFC1533_GATEWAY,
|
107
|
103
|
RFC1533_HOSTNAME,
|
108
|
|
- RFC1533_VENDOR
|
|
104
|
+ RFC1533_VENDOR,
|
109
|
105
|
#ifdef PXE_DHCP_STRICT
|
110
|
106
|
,RFC2132_VENDOR_CLASS_ID,
|
111
|
107
|
RFC1533_VENDOR_PXE_OPT128,
|
|
@@ -115,11 +111,9 @@ static const unsigned char dhcpdiscover[] = {
|
115
|
111
|
RFC1533_VENDOR_PXE_OPT132,
|
116
|
112
|
RFC1533_VENDOR_PXE_OPT133,
|
117
|
113
|
RFC1533_VENDOR_PXE_OPT134,
|
118
|
|
- RFC1533_VENDOR_PXE_OPT135
|
|
114
|
+ RFC1533_VENDOR_PXE_OPT135,
|
119
|
115
|
#endif /* PXE_DHCP_STRICT */
|
120
|
|
-#ifdef DNS_RESOLVER
|
121
|
|
- ,RFC1533_DNS
|
122
|
|
-#endif
|
|
116
|
+ RFC1533_DNS
|
123
|
117
|
};
|
124
|
118
|
static const unsigned char dhcprequest [] = {
|
125
|
119
|
RFC2132_MSG_TYPE,1,DHCPREQUEST,
|
|
@@ -162,11 +156,7 @@ static const unsigned char dhcprequest [] = {
|
162
|
156
|
#else
|
163
|
157
|
#define DHCPREQUEST_PARAMS_FREEBSD 0
|
164
|
158
|
#endif /* IMAGE_FREEBSD */
|
165
|
|
-#ifdef DNS_RESOLVER
|
166
|
159
|
#define DHCPREQUEST_PARAMS_DNS 1
|
167
|
|
-#else
|
168
|
|
-#define DHCPREQUEST_PARAMS_DNS 0
|
169
|
|
-#endif /* DNS_RESOLVER */
|
170
|
160
|
( DHCPREQUEST_PARAMS_BASE +
|
171
|
161
|
DHCPREQUEST_PARAMS_PXE +
|
172
|
162
|
DHCPREQUEST_PARAMS_VENDOR_PXE +
|
|
@@ -191,10 +181,8 @@ static const unsigned char dhcprequest [] = {
|
191
|
181
|
RFC1533_VENDOR_HOWTO,
|
192
|
182
|
RFC1533_VENDOR_KERNEL_ENV,
|
193
|
183
|
#endif
|
194
|
|
-#ifdef DNS_RESOLVER
|
195
|
184
|
/* 1 DNS option */
|
196
|
185
|
RFC1533_DNS,
|
197
|
|
-#endif
|
198
|
186
|
#ifdef PXE_DHCP_STRICT
|
199
|
187
|
RFC2132_VENDOR_CLASS_ID,
|
200
|
188
|
RFC1533_VENDOR_PXE_OPT128,
|
|
@@ -282,10 +270,8 @@ static int nic_configure ( struct type_dev *type_dev ) {
|
282
|
270
|
BOOTP_DATA_ADDR->bootp_reply.bp_giaddr.s_addr);
|
283
|
271
|
if (arptable[ARP_GATEWAY].ipaddr.s_addr)
|
284
|
272
|
printf(", Gateway %@", arptable[ARP_GATEWAY].ipaddr.s_addr);
|
285
|
|
-#ifdef DNS_RESOLVER
|
286
|
273
|
if (arptable[ARP_NAMESERVER].ipaddr.s_addr)
|
287
|
274
|
printf(", Nameserver %@", arptable[ARP_NAMESERVER].ipaddr.s_addr);
|
288
|
|
-#endif
|
289
|
275
|
putchar('\n');
|
290
|
276
|
|
291
|
277
|
#ifdef MDEBUG
|
|
@@ -1599,13 +1585,11 @@ int decode_rfc1533(unsigned char *p, unsigned int block, unsigned int len, int e
|
1599
|
1585
|
}
|
1600
|
1586
|
}
|
1601
|
1587
|
#endif
|
1602
|
|
-#ifdef DNS_RESOLVER
|
1603
|
1588
|
else if (NON_ENCAP_OPT c == RFC1533_DNS) {
|
1604
|
1589
|
// TODO: Copy the DNS IP somewhere reasonable
|
1605
|
1590
|
if (TAG_LEN(p) >= sizeof(in_addr))
|
1606
|
1591
|
memcpy(&arptable[ARP_NAMESERVER].ipaddr, p+2, sizeof(in_addr));
|
1607
|
1592
|
}
|
1608
|
|
-#endif
|
1609
|
1593
|
else {
|
1610
|
1594
|
#if 0
|
1611
|
1595
|
unsigned char *q;
|