nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

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

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