The ipv4 address field is not initialized to zero that would make the
subsequent check to become false positive. The outcome is broken network
interface being created with garbage value which may potentially break network
connectivity.

This patch fixes the problem by initializing them to zero as needed by
subsequent checks.
---
 grub-core/net/drivers/ieee1275/ofnet.c | 3 +++
 1 file changed, 3 insertions(+)

Index: grub-2.02/grub-core/net/drivers/ieee1275/ofnet.c
===================================================================
--- grub-2.02.orig/grub-core/net/drivers/ieee1275/ofnet.c
+++ grub-2.02/grub-core/net/drivers/ieee1275/ofnet.c
@@ -160,6 +160,9 @@ grub_ieee1275_parse_bootpath (const char
   grub_uint32_t vlantag = 0;
 
   hw_addr.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET;
+  client_addr.ipv4 = 0;
+  gateway_addr.ipv4 = 0;
+  subnet_mask.ipv4 = 0;
 
   args = bootpath + grub_strlen (devpath) + 1;
   do

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to