[PATCH 05/11] Parse GUIDs from NVRAM
Daniel M. Weeks
weeksd2 at rpi.edu
Fri Apr 17 03:59:18 AEST 2020
Parse any length hardware address from NVRAM, up to the maximum size of
the buffer.
Signed-off-by: Daniel M. Weeks <weeksd2 at rpi.edu>
---
discover/platform-powerpc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/discover/platform-powerpc.c b/discover/platform-powerpc.c
index 29f8003..a6e24fc 100644
--- a/discover/platform-powerpc.c
+++ b/discover/platform-powerpc.c
@@ -263,7 +263,7 @@ static int parse_hwaddr(struct interface_config *ifconf, char *str)
{
unsigned int i;
- if (strlen(str) != strlen("00:00:00:00:00:00"))
+ if (strlen(str) > 3*MAX_HWADDR_SIZE-1)
return -1;
ifconf->hwaddr_len = strlen(str) / 3 + 1;
--
Daniel M. Weeks
--
Daniel M. Weeks
Lead HPC Developer
Center for Computational Innovations
Rensselaer Polytechnic Institute
Troy, NY 12180
518-276-4458
More information about the Petitboot
mailing list