+2012-05-01 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * grub-core/net/ip.c (handle_dgram): Fix undeclared variable.
+
2012-05-01 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/normal/autofs.c (read_fs_list): Revert accidental wrong
udph = (struct udphdr *) nb->data;
if (proto == GRUB_NET_IP_UDP && grub_be_to_cpu16 (udph->dst) == 68)
{
+ const struct grub_net_bootp_packet *bootp;
if (udph->chksum)
{
grub_uint16_t chk, expected;
grub_netbuff_free (nb);
return err;
}
+
+ bootp = (const struct grub_net_bootp_packet *) nb->data;
FOR_NET_NETWORK_LEVEL_INTERFACES (inf)
if (inf->card == card
&& inf->address.type == GRUB_NET_NETWORK_LEVEL_PROTOCOL_DHCP_RECV
&& inf->hwaddress.type == GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET
- && grub_memcmp (inf->hwaddress.mac, &dhcp->mac_addr,
+ && grub_memcmp (inf->hwaddress.mac, &bootp->mac_addr,
sizeof (inf->hwaddress.mac)) == 0)
{
grub_net_process_dhcp (nb, inf->card);