As reported by Andy via bugs@, our dhcpd is tad too accommodating
with its ACK'ing. According to RFC 2131 the server should only ACK
a REQUEST containing a server-identifier option if the server-identifier
identifies that server.

Andy confirms this works for him. Any other testers with challenging
dhcpd setups want to comment?

.... Ken

Index: dhcp.c
===================================================================
RCS file: /cvs/src/usr.sbin/dhcpd/dhcp.c,v
retrieving revision 1.33
diff -u -p -r1.33 dhcp.c
--- dhcp.c      14 Feb 2013 22:06:13 -0000      1.33
+++ dhcp.c      10 Mar 2013 15:16:27 -0000
@@ -321,6 +321,15 @@ dhcprequest(struct packet *packet)
                return;
        }
 
+       /*
+        * Do not ACK a REQUEST intended for another server.
+        */
+       if (packet->options[DHO_DHCP_SERVER_IDENTIFIER].len == 4) {
+               if (memcmp(packet->options[DHO_DHCP_SERVER_IDENTIFIER].data,
+                   &packet->interface->primary_address, 4))
+                       return;
+       }
+ 
        /*
         * If we own the lease that the client is asking for,
         * and it's already been assigned to the client, ack it.

Reply via email to