Bug 6963

Summary: Pump-0.7.2 request hw type hardcoded to ethernet
Product: [Retired] Red Hat Linux Reporter: safford
Component: pumpAssignee: Erik Troan <ewt>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-02-24 17:47:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description safford 1999-11-12 20:51:08 UTC
The dhcp request field for hardware type is hardcoded to 1 (ethernet),
which may cause the server to ignore the requests on other media,
such as token ring. The correction is simple - use the if reported
family to set the hw type. The following patch has been tested to fix
the problem on a token ring net, without affecting ethernet operation.

dave safford
----------------------------------------------------------------------
*** dhcp.c.old	Fri Nov 12 15:37:03 1999
--- dhcp.c	Fri Nov 12 15:23:47 1999
***************
*** 492,498 ****
      if (ioctl(sock, SIOCGIFHWADDR, &req))
  	return perrorstr("SIOCSIFHWADDR");

!     breq->hw = 1; 		/* ethernet */
      breq->hwlength = IFHWADDRLEN;
      memcpy(breq->hwaddr, req.ifr_hwaddr.sa_data, IFHWADDRLEN);

--- 492,500 ----
      if (ioctl(sock, SIOCGIFHWADDR, &req))
  	return perrorstr("SIOCSIFHWADDR");

!     /*breq->hw = 1;*/ 		/* ethernet */
!     breq->hw = req.ifr_hwaddr.sa_family;
!
      breq->hwlength = IFHWADDRLEN;
      memcpy(breq->hwaddr, req.ifr_hwaddr.sa_data, IFHWADDRLEN);

Comment 1 Erik Troan 2000-02-24 17:47:59 UTC
Thanks for the patch -- this will be fixed in the next version of pump.

Does pump now work on token ring?