From 7f98dc04499c1c25ac75f515ad5fd4309440dc02 Mon Sep 17 00:00:00 2001 From: Archie Cobbs Date: Fri, 1 Sep 2000 00:28:03 +0000 Subject: [PATCH] Fix wrong offset bug in ng_enaddr_unparse(). --- sys/netgraph/ng_ether.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/netgraph/ng_ether.c b/sys/netgraph/ng_ether.c index 1b2b9cca6496..887c6b60be69 100644 --- a/sys/netgraph/ng_ether.c +++ b/sys/netgraph/ng_ether.c @@ -734,7 +734,8 @@ ng_enaddr_unparse(const struct ng_parse_type *type, int len; len = snprintf(cbuf, cbuflen, "%02x:%02x:%02x:%02x:%02x:%02x", - data[0], data[1], data[2], data[3], data[4], data[5]); + data[*off], data[*off + 1], data[*off + 2], + data[*off + 3], data[*off + 4], data[*off + 5]); if (len >= cbuflen) return (ERANGE); *off += ETHER_ADDR_LEN;