Bug 14719 - DHCP messageType is not accepted by some servers if not first vendorcode
DHCP messageType is not accepted by some servers if not first vendorcode
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: pump (Show other bugs)
6.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Erik Troan
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-07-27 06:50 EDT by Need Real Name
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

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


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2000-07-27 06:50:48 EDT
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 11:14:37 EDT
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.