Mikolaj Kucharski <[email protected]> writes: > Ping > > http://marc.info/?l=openbsd-ports&m=140771169802733&w=2
So the update, which Stuart has committed, looks fine to me. There's one non-important but ugly bit that could be fixed easily, the interface MAC address gets printed as: ffffffab:ffffffcd:ffffffef:01:ffffffab:ffffffcd Here's a possible fix that adds no other patch. But I would probably suggest upstream to just make if_hw_addr an unsigned char array instead. ok? Index: Makefile =================================================================== RCS file: /cvs/ports/net/iftop/Makefile,v retrieving revision 1.11 diff -u -p -r1.11 Makefile --- Makefile 19 Aug 2014 21:19:00 -0000 1.11 +++ Makefile 19 Aug 2014 22:20:12 -0000 @@ -3,6 +3,7 @@ COMMENT = display bandwidth usage on an interface DISTNAME = iftop-1.0pre4 +REVISION = 0 CATEGORIES = net HOMEPAGE = http://www.ex-parrot.com/~pdw/iftop/ Index: patches/patch-iptop.c =================================================================== RCS file: /cvs/ports/net/iftop/patches/patch-iptop.c,v retrieving revision 1.4 diff -u -p -r1.4 patch-iptop.c --- patches/patch-iptop.c 19 Aug 2014 21:19:00 -0000 1.4 +++ patches/patch-iptop.c 19 Aug 2014 22:20:12 -0000 @@ -1,6 +1,6 @@ $OpenBSD: patch-iptop.c,v 1.4 2014/08/19 21:19:00 sthen Exp $ ---- iftop.c.orig Wed Jan 1 15:20:10 2014 -+++ iftop.c Tue Jan 14 00:51:01 2014 +--- iftop.c.orig Sun Jan 19 21:21:19 2014 ++++ iftop.c Wed Aug 20 00:19:40 2014 @@ -28,6 +28,8 @@ #include <string.h> #include <unistd.h> @@ -10,6 +10,15 @@ $OpenBSD: patch-iptop.c,v 1.4 2014/08/19 #include "iftop.h" #include "addr_hash.h" +@@ -713,7 +715,7 @@ void packet_init() { + if(have_hw_addr) { + fprintf(stderr, "MAC address is:"); + for (i = 0; i < 6; ++i) +- fprintf(stderr, "%c%02x", i ? ':' : ' ', (unsigned int)if_hw_addr[i]); ++ fprintf(stderr, "%c%02x", i ? ':' : ' ', if_hw_addr[i] & 0xff); + fprintf(stderr, "\n"); + } + @@ -768,7 +770,7 @@ void packet_init() { else { fprintf(stderr, "Unsupported datalink type: %d\n" -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE
