rp-pppoe plugin: Print leading zeros in MAC address
authorBenjamin LaHaise <bcrl@kvack.org>
Wed, 7 Dec 2011 19:44:21 +0000 (14:44 -0500)
committerPaul Mackerras <paulus@samba.org>
Sun, 20 May 2012 06:49:27 +0000 (16:49 +1000)
The rp-pppoe pppd plugin prints MAC addresses without the leading 0.
That looks odd, so this adds the leading 0.

Signed-off-by: Benjamin LaHaise <bcrl@kvack.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
pppd/plugins/rp-pppoe/common.c

index 3b8e0140a37bf6e9e6919c310483ab34a4885bde..89c633c773f93ed668fd64b0795c91035bef8cc6 100644 (file)
@@ -209,8 +209,8 @@ void pppoe_printpkt(PPPoEPacket *packet,
                ntohs(packet->ethHdr.h_proto));
     }
 
-    printer(arg, " dst %x:%x:%x:%x:%x:%x ", EH(packet->ethHdr.h_dest));
-    printer(arg, " src %x:%x:%x:%x:%x:%x\n", EH(packet->ethHdr.h_source));
+    printer(arg, " dst %02x:%02x:%02x:%02x:%02x:%02x ", EH(packet->ethHdr.h_dest));
+    printer(arg, " src %02x:%02x:%02x:%02x:%02x:%02x\n", EH(packet->ethHdr.h_source));
     if (ntohs(packet->ethHdr.h_proto) != ETH_PPPOE_DISCOVERY)
        return;