Bug 14719 - DHCP messageType is not accepted by some servers if not first vendorcode
Summary: DHCP messageType is not accepted by some servers if not first vendorcode
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: pump (Show other bugs)
(Show other bugs)
Version: 6.2
Hardware: i386 Linux
medium
medium
Target Milestone: ---
Assignee: Erik Troan
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-07-27 10:50 UTC by Need Real Name
Modified: 2008-05-01 15:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-07-27 10:51:12 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Need Real Name 2000-07-27 10:50:48 UTC
Patch follows:
*** dhcp.c-virgin	Tue Feb 15 22:59:11 2000
--- dhcp.c	Thu Jul 27 13:44:13 2000
***************
*** 1188,1193 ****
--- 1188,1197 ----
  
  	initVendorCodes(&breq);
  
+ 	/* some servers require this as first option //pessi */
+ 	messageType = DHCP_TYPE_DISCOVER; 
+ 	addVendorCode(&breq, DHCP_OPTION_TYPE, 1, &messageType);
+ 
  	aShort = ntohs(sizeof(struct bootpRequest));
  	addVendorCode(&breq, DHCP_OPTION_MAXSIZE, 2, &aShort);
  
***************
*** 1205,1210 ****
--- 1209,1215 ----
  	optionsRequested[numOptions++] = DHCP_OPTION_XDMSRVS;
  	addVendorCode(&breq, DHCP_OPTION_OPTIONREQ, numOptions, 
  		      optionsRequested);
+ 	breq.id++;		/* new request, new id //pessi */
  
  	if (!reqHostname) {
  	    reqHostname = alloca(200);
***************
*** 1225,1233 ****
  	protoReq = breq;
  
  	syslog (LOG_DEBUG, "PUMP: sending second discover");
- 
- 	messageType = DHCP_TYPE_DISCOVER;
- 	addVendorCode(&breq, DHCP_OPTION_TYPE, 1, &messageType);
  
  	/* Send another DHCP_REQUEST with the proper option list */
  	if ((chptr = handleTransaction(s, override, &breq, &bresp, 
--- 1230,1235 ----

Comment 1 Erik Troan 2000-08-04 15:14:37 UTC
Applied for pump-0.8. Thank you for finding this.


Note You need to log in before you can comment on or make changes to this bug.