mirror of
https://github.com/opnsense/src.git
synced 2026-06-03 13:58:30 -04:00
Fix ether_ntoa() to generate the %02x format people expect, instead of %x,
for the ethernet address. MFC after: 1 day
This commit is contained in:
parent
65528d1782
commit
87bd4d6ceb
1 changed files with 3 additions and 2 deletions
|
|
@ -118,8 +118,9 @@ char
|
|||
int i;
|
||||
static char a[18];
|
||||
|
||||
i = sprintf(a,"%x:%x:%x:%x:%x:%x",n->octet[0],n->octet[1],n->octet[2],
|
||||
n->octet[3],n->octet[4],n->octet[5]);
|
||||
i = sprintf(a,"%02x:%02x:%02x:%02x:%02x:%02x",
|
||||
n->octet[0],n->octet[1],n->octet[2],
|
||||
n->octet[3],n->octet[4],n->octet[5]);
|
||||
if (i < 11)
|
||||
return (NULL);
|
||||
return ((char *)&a);
|
||||
|
|
|
|||
Loading…
Reference in a new issue