Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 6963 - Pump-0.7.2 request hw type hardcoded to ethernet
Summary: Pump-0.7.2 request hw type hardcoded to ethernet
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: pump
Version: 6.1
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Erik Troan
QA Contact:
Depends On:
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:
Last Closed: 2000-02-24 17:47:24 UTC

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.