]> git.proxmox.com Git - grub2.git/commit
ofnet: Initialize structs in bootpath parser
authorJulian Andres Klode <julian.klode@canonical.com>
Mon, 3 Sep 2018 08:09:15 +0000 (10:09 +0200)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 13 Sep 2018 09:03:05 +0000 (11:03 +0200)
commita661a321c314d23cd2666c82cbb38d356c7956ba
treeaa22129596713cd8f296b13e2906d6866913f6ec
parent478e54b7380f7fe53bd9a664f1496b72ce1ea9e6
ofnet: Initialize structs in bootpath parser

Code later on checks if variables inside the struct are
0 to see if they have been set, like if there were addresses
in the bootpath.

The variables were not initialized however, so the check
might succeed with uninitialized data, and a new interface
with random addresses and the same name is added. This causes
$net_default_mac to point to the random one, so, for example,
using that variable to load per-mac config files fails.

Bug-Ubuntu: https://bugs.launchpad.net/bugs/1785859

Signed-off-by: Julian Andres Klode <julian.klode@canonical.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/net/drivers/ieee1275/ofnet.c