[PATCH 04/11] Make MAC address length requirement explicit

Daniel M. Weeks weeksd2 at rpi.edu
Fri Apr 17 03:54:34 AEST 2020


In the future, the size of the hwaddr buffer may not be 6 bytes.

Signed-off-by: Daniel M. Weeks <weeksd2 at rpi.edu>
---
 discover/ipmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/discover/ipmi.c b/discover/ipmi.c
index d652e9f..32319fc 100644
--- a/discover/ipmi.c
+++ b/discover/ipmi.c
@@ -244,7 +244,7 @@ int parse_ipmi_interface_override(struct config *config, uint8_t *buf,
 	}
 
 	/* At the moment only support 6-byte MAC addresses */
-	if (hwsize != sizeof(ifconf->hwaddr)) {
+	if (hwsize != HWADDR_SIZE) {
 		pb_log("Unsupported HW address size in network override: %u\n",
 		       hwsize);
 		return -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