applying fix for:
authorpgf <pgf@69ca8d6d-28ef-0310-b511-8ec308f3f277>
Wed, 20 Jul 2005 19:13:21 +0000 (19:13 +0000)
committerpgf <pgf@69ca8d6d-28ef-0310-b511-8ec308f3f277>
Wed, 20 Jul 2005 19:13:21 +0000 (19:13 +0000)
     0000260: udhcpc doesn't validate client hardware address

git-svn-id: svn://busybox.net/trunk/busybox@10880 69ca8d6d-28ef-0310-b511-8ec308f3f277

networking/udhcp/dhcpc.c

index d99711c..7d50a72 100644 (file)
@@ -443,6 +443,11 @@ int main(int argc, char *argv[])
                        if (memcmp(client_config.arp,packet.chaddr,6))
                                continue;
 
+                       if (memcmp(packet.chaddr, client_config.arp, 6)) {
+                               DEBUG(LOG_INFO, "packet does not have our chaddr -- ignoring");
+                               continue;
+                       }
+
                        if ((message = get_option(&packet, DHCP_MESSAGE_TYPE)) == NULL) {
                                DEBUG(LOG_ERR, "couldnt get option from packet -- ignoring");
                                continue;