Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 97311 - net-misc/dhcp - DHCP init script should set route for 255.255.255.255
Summary: net-misc/dhcp - DHCP init script should set route for 255.255.255.255
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All All
: High enhancement
Assignee: Max Kalika (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-28 08:31 UTC by Jozsef Daniel
Modified: 2005-06-28 15:47 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jozsef Daniel 2005-06-28 08:31:15 UTC
Package: net-misc/dhcpd-3.0.1-r1

I had some trouble setting DHCP up for a network consisting mainly of Microsoft clients. After some research I found that Microsoft DHCP clients only accept DHCP messages which are addressed to "255.255.255.255", strictly conforming to the protocol declaration.
Therefore, I think it should be nice to include an option in the init.d script for dhcpd to set the route for 255.255.255.255 for ${IFACE} (the interface the dhcp server is running on). A new option with a short explanation in conf.d/dhcp would be nice to toggle this behavior.

This is how I modified my init.d/dhcp:
*** dhcp.old    2005-06-28 17:09:14.253256181 +0200
--- dhcp        2005-06-28 17:23:52.145921442 +0200
***************
*** 23,28 ****
--- 23,34 ----
        ebegin "Setting ownership on dhcpd.leases"
        chown dhcp:dhcp "${CHROOT}/var/lib/dhcp/dhcpd.leases" || return 1
        eend $?
+
+       if [[ ${SETALLONES} == "1" ]] ; then
+               ebegin "Setting route for 255.255.255.255 to ${IFACE}"
+               route add 255.255.255.255 ${IFACE} || return 1
+               eend $?
+       fi
  }

  start() {

And this is the diff for conf.d/dhcp:
*** dhcp.old    2005-06-28 17:27:18.752600550 +0200
--- dhcp        2005-06-28 17:26:00.638820421 +0200
***************
*** 6,11 ****
--- 6,16 ----
  # list all interfaces space separated.
  IFACE="ath0"

+ # Set the route for the address 255.255.255.255 to the interface dhcp
+ # listens on.
+ # This is required by some clients. All Microsoft clients need it.
+ SETALLONES="1"
+
  # Insert any other options needed
  DHCPD_OPTS="-q"


I think this small function would be welcome by many users.
Comment 1 Jozsef Daniel 2005-06-28 15:47:32 UTC
I just found out that the error was caused by something else, since the daemon
bypasses the Linux IP stack from kernel version 2.2 on.
Setting the route is not necessary...