Fix padding of mac addresses
This commit is contained in:
parent
f2c6fb79dc
commit
6549f3467f
2
mac.go
2
mac.go
|
@ -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()
|
||||||
|
|
Loading…
Reference in New Issue