=== modified file 'grub-core/net/ip.c' --- grub-core/net/ip.c 2012-02-09 22:43:43 +0000 +++ grub-core/net/ip.c 2012-04-29 18:56:57 +0000 @@ -240,7 +240,7 @@ FOR_NET_NETWORK_LEVEL_INTERFACES (inf) if (inf->card == card && inf->address.type == GRUB_NET_NETWORK_LEVEL_PROTOCOL_DHCP_RECV - && grub_net_hwaddr_cmp (&inf->hwaddress, hwaddress) == 0) + && inf->hwaddress.type == GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET) { if (udph->chksum) { @@ -257,18 +257,25 @@ "Expected %x, got %x\n", grub_be_to_cpu16 (expected), grub_be_to_cpu16 (chk)); - grub_netbuff_free (nb); - return GRUB_ERR_NONE; + break; } udph->chksum = chk; } err = grub_netbuff_pull (nb, sizeof (*udph)); if (err) - return err; - grub_net_process_dhcp (nb, inf->card); - grub_netbuff_free (nb); - return GRUB_ERR_NONE; + { + grub_netbuff_free (nb); + return err; + } + struct grub_net_bootp_packet *dhcp = + (struct grub_net_bootp_packet *) nb->data; + if (grub_memcmp(inf->hwaddress.mac, &dhcp->mac_addr, + sizeof(inf->hwaddress.mac)) == 0) + { + grub_net_process_dhcp (nb, inf->card); + break; + } } grub_netbuff_free (nb); return GRUB_ERR_NONE;