icmp6 fix no respond to neighbor solicit message

The structure size used in grub_netbuff_pull to get the pointer to
option header is apparently wrong, which leads to subsequent range check
failed and therefore not responding to any neighbor solicit message in my
testing.
This commit is contained in:
Michael Chang 2014-11-03 16:27:45 +08:00 committed by Andrei Borzenkov
parent 9a67e1ac8e
commit 72ec399ad8
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2014-11-03 Michael Chang <mchang@suse.com>
* grub-core/net/icmp6.c (grub_net_recv_icmp6_packet): Fix size
of neighbor solicitation packet in grub_netbuff_pull.
2014-10-14 Andrei Borzenkov <arvidjaar@gmail.com> 2014-10-14 Andrei Borzenkov <arvidjaar@gmail.com>
* grub-core/loader/arm/linux.c: Use full initializer for initrd_ctx to * grub-core/loader/arm/linux.c: Use full initializer for initrd_ctx to

View file

@ -205,7 +205,7 @@ grub_net_recv_icmp6_packet (struct grub_net_buff *nb,
if (ttl != 0xff) if (ttl != 0xff)
break; break;
nbh = (struct neighbour_solicit *) nb->data; nbh = (struct neighbour_solicit *) nb->data;
err = grub_netbuff_pull (nb, sizeof (struct router_adv)); err = grub_netbuff_pull (nb, sizeof (*nbh));
if (err) if (err)
{ {
grub_netbuff_free (nb); grub_netbuff_free (nb);