Bug 6963 - Pump-0.7.2 request hw type hardcoded to ethernet
Summary: Pump-0.7.2 request hw type hardcoded to ethernet
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: pump
Version: 6.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Erik Troan
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-11-12 20:51 UTC by safford
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-02-24 17:47:24 UTC
Embargoed:


Attachments (Terms of Use)

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?


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