Bug 6963 - Pump-0.7.2 request hw type hardcoded to ethernet
Pump-0.7.2 request hw type hardcoded to ethernet
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: pump (Show other bugs)
6.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Erik Troan
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-11-12 15:51 EST by safford
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-02-24 12:47:24 EST
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 safford 1999-11-12 15:51:08 EST
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 12:47:59 EST
Thanks for the patch -- this will be fixed in the next version of pump.

Does pump now work on token ring?

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