mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-26 09:10:53 +00:00
merge mine and abranches' branches. Fix several issues
This commit is contained in:
commit
a057797f18
11 files changed
+72
-19
No files matched your search
+6
-2
@@ -39,6 +39,7 @@ grub_net_arp_resolve (struct grub_net_network_level_interface *inf,
|
||||
struct arphdr *arp_header;
|
||||
grub_net_link_level_address_t target_hw_addr;
|
||||
char *aux, arp_data[128];
|
||||
grub_err_t err;
|
||||
int i;
|
||||
|
||||
if (proto_addr->type == GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV4
|
||||
@@ -60,9 +61,12 @@ grub_net_arp_resolve (struct grub_net_network_level_interface *inf,
|
||||
nb.head = arp_data;
|
||||
nb.end = arp_data + sizeof (arp_data);
|
||||
grub_netbuff_clear (&nb);
|
||||
|
||||
grub_netbuff_reserve (&nb, 128);
|
||||
grub_netbuff_push (&nb, sizeof (*arp_header) + 2 * (6 + 4));
|
||||
|
||||
err = grub_netbuff_push (&nb, sizeof (*arp_header) + 2 * (6 + 4));
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
arp_header = (struct arphdr *) nb.data;
|
||||
arp_header->hrd = grub_cpu_to_be16 (GRUB_NET_ARPHRD_ETHERNET);
|
||||
arp_header->pro = grub_cpu_to_be16 (GRUB_NET_ETHERTYPE_IP);
|
||||
|
||||
Reference in new issue
Block a user