dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

Blame SOURCES/0173-icmp6-fix-no-respond-to-neighbor-solicit-message.patch

f725e3
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
f725e3
From: Michael Chang <mchang@suse.com>
f725e3
Date: Mon, 3 Nov 2014 16:27:45 +0800
f725e3
Subject: [PATCH] icmp6 fix no respond to neighbor solicit message
f725e3
f725e3
The structure size used in grub_netbuff_pull to get the pointer to
f725e3
option header is apparently wrong, which leads to subsequent range check
f725e3
failed and therefore not responding to any neighbor solicit message in my
f725e3
testing.
f725e3
---
f725e3
 grub-core/net/icmp6.c | 2 +-
f725e3
 1 file changed, 1 insertion(+), 1 deletion(-)
f725e3
f725e3
diff --git a/grub-core/net/icmp6.c b/grub-core/net/icmp6.c
f725e3
index 0843a15afda..78223946031 100644
f725e3
--- a/grub-core/net/icmp6.c
f725e3
+++ b/grub-core/net/icmp6.c
f725e3
@@ -211,7 +211,7 @@ grub_net_recv_icmp6_packet (struct grub_net_buff *nb,
f725e3
 	if (ttl != 0xff)
f725e3
 	  break;
f725e3
 	nbh = (struct neighbour_solicit *) nb->data;
f725e3
-	err = grub_netbuff_pull (nb, sizeof (struct router_adv));
f725e3
+	err = grub_netbuff_pull (nb, sizeof (*nbh));
f725e3
 	if (err)
f725e3
 	  {
f725e3
 	    grub_netbuff_free (nb);