On Fri, Aug 22, 2014 at 11:16:31PM +0100, Stuart Henderson wrote:
| On 2014/08/23 00:00, Martin Pieuchot wrote:
| > On 22/08/14(Fri) 22:54, Stuart Henderson wrote:
| > > can we go back to the standard MAC address formatting that's used
| > > everywhere except ndp?
| >
| > Fine with me, any reason not to do it for ndp too?
|
| None that I know of ...
Please!
| Index: ndp.c
| ===================================================================
| RCS file: /cvs/src/usr.sbin/ndp/ndp.c,v
| retrieving revision 1.55
| diff -u -p -r1.55 ndp.c
| --- ndp.c 19 Aug 2014 12:39:36 -0000 1.55
| +++ ndp.c 22 Aug 2014 22:16:08 -0000
| @@ -781,7 +781,7 @@ ether_str(struct sockaddr_dl *sdl)
|
| if (sdl->sdl_alen) {
| cp = (u_char *)LLADDR(sdl);
| - snprintf(hbuf, sizeof(hbuf), "%x:%x:%x:%x:%x:%x",
| + snprintf(hbuf, sizeof(hbuf), "%02x:%02x:%02x:%02x:%02x:%02x",
| cp[0], cp[1], cp[2], cp[3], cp[4], cp[5]);
| } else
| snprintf(hbuf, sizeof(hbuf), "(incomplete)");
|
--
>++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
+++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
http://www.weirdnet.nl/