Fix padding of mac addresses

This commit is contained in:
Alex D. 2024-07-07 12:18:53 +00:00
parent f2c6fb79dc
commit 6549f3467f
Signed by: caskd
GPG Key ID: F92BA85F61F4C173
1 changed files with 1 additions and 1 deletions

2
mac.go
View File

@ -43,7 +43,7 @@ func (i *iface) ProcMAC() (err error) {
_, err = sb.WriteString(i.pfx) _, err = sb.WriteString(i.pfx)
_, err = sb.WriteString("x") _, err = sb.WriteString("x")
for _, v := range addr { for _, v := range addr {
_, err = sb.WriteString(fmt.Sprintf("%x", v)) _, err = sb.WriteString(fmt.Sprintf("%02x", v))
} }
i.names[IfNameMAC] = sb.String() i.names[IfNameMAC] = sb.String()