View | Details | Raw Unified | Return to bug 27669
Collapse All | Expand All

(-)a/dhcp.c (+11 lines)
Lines 243-248 static void parse_reply(struct bootp_request * breq, struct interface_info * int Link Here
243
			tmp_str[length] = '\0';
243
			tmp_str[length] = '\0';
244
			domain = strdup(tmp_str);
244
			domain = strdup(tmp_str);
245
			log_message("got domain %s", domain);
245
			log_message("got domain %s", domain);
246
			if (setdomainname(domain, strlen(domain)) == 0) 
247
				log_message("set domain %s", domain);
248
			else
249
				log_message("could not set domain %s", domain);
250
246
			break;
251
			break;
247
252
248
		case BOOTP_OPTION_BROADCAST:
253
		case BOOTP_OPTION_BROADCAST:
Lines 260-265 static void parse_reply(struct bootp_request * breq, struct interface_info * int Link Here
260
			tmp_str[length] = '\0';
265
			tmp_str[length] = '\0';
261
			hostname = strdup(tmp_str);
266
			hostname = strdup(tmp_str);
262
			log_message("got hostname %s", hostname);
267
			log_message("got hostname %s", hostname);
268
			if (sethostname(hostname, strlen(hostname)) == 0)
269
				log_message("set hostname %s", hostname);
270
			else
271
				log_message("could not set hostname %s", hostname);
272
263
			break;
273
			break;
264
274
265
		case BOOTP_OPTION_ROOTPATH:
275
		case BOOTP_OPTION_ROOTPATH:
Lines 591-596 enum return_type perform_dhcp(struct interface_info * intf) Link Here
591
	requested_options[num_options++] = BOOTP_OPTION_GATEWAY;
601
	requested_options[num_options++] = BOOTP_OPTION_GATEWAY;
592
	requested_options[num_options++] = BOOTP_OPTION_DNS;
602
	requested_options[num_options++] = BOOTP_OPTION_DNS;
593
	requested_options[num_options++] = BOOTP_OPTION_DOMAIN;
603
	requested_options[num_options++] = BOOTP_OPTION_DOMAIN;
604
	requested_options[num_options++] = BOOTP_OPTION_HOSTNAME;
594
	requested_options[num_options++] = BOOTP_OPTION_ROOTPATH;
605
	requested_options[num_options++] = BOOTP_OPTION_ROOTPATH;
595
	requested_options[num_options++] = BOOTP_OPTION_BROADCAST;
606
	requested_options[num_options++] = BOOTP_OPTION_BROADCAST;
596
	add_vendor_code(&breq, DHCP_OPTION_OPTIONREQ, num_options, requested_options);
607
	add_vendor_code(&breq, DHCP_OPTION_OPTIONREQ, num_options, requested_options);

Return to bug 27669