]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/net/ip.c (handle_dgram): Fix undeclared variable.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 1 May 2012 13:29:44 +0000 (15:29 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 1 May 2012 13:29:44 +0000 (15:29 +0200)
ChangeLog
grub-core/net/ip.c

index 1a06292141ca76f7b05ce2ebc91e0e4b65dd3a49..b56c00b4033c5b6e05b378bf201aa65cf7d04122 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+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
index 131e81ee0389b91abba1e91a1137710da2783d26..b0658f01a7a665a2e89d13e1c8eb63380ec4b55b 100644 (file)
@@ -237,6 +237,7 @@ handle_dgram (struct grub_net_buff *nb,
     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;
@@ -264,12 +265,14 @@ handle_dgram (struct grub_net_buff *nb,
            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);