diff options
author | riastradh <riastradh@pkgsrc.org> | 2013-08-09 18:15:18 +0000 |
---|---|---|
committer | riastradh <riastradh@pkgsrc.org> | 2013-08-09 18:15:18 +0000 |
commit | 5661503e54528e4c4c7934646b245cc38e80fecd (patch) | |
tree | 700ee2a9b63135f9ad522b8eedd143246480bc40 /net/bmon | |
parent | 4b7979331a0c0c1314a137b53346a81f79b9ab29 (diff) | |
download | pkgsrc-5661503e54528e4c4c7934646b245cc38e80fecd.tar.gz |
Patch net/bmon to handle nonzero leading lladdr octets gracefully.
Diffstat (limited to 'net/bmon')
-rw-r--r-- | net/bmon/Makefile | 4 | ||||
-rw-r--r-- | net/bmon/distinfo | 3 | ||||
-rw-r--r-- | net/bmon/patches/patch-src_in_sysctl.c | 28 |
3 files changed, 32 insertions, 3 deletions
diff --git a/net/bmon/Makefile b/net/bmon/Makefile index 642971f6264..f4e319a8c45 100644 --- a/net/bmon/Makefile +++ b/net/bmon/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.11 2012/10/23 17:18:12 asau Exp $ +# $NetBSD: Makefile,v 1.12 2013/08/09 18:15:18 riastradh Exp $ # DISTNAME= bmon-2.0.1 -PKGREVISION= 2 +PKGREVISION= 3 CATEGORIES= net MASTER_SITES= http://people.suug.ch/~tgr/bmon/files/ diff --git a/net/bmon/distinfo b/net/bmon/distinfo index 84a2715decd..8eb06d841a0 100644 --- a/net/bmon/distinfo +++ b/net/bmon/distinfo @@ -1,7 +1,8 @@ -$NetBSD: distinfo,v 1.3 2012/01/23 20:52:18 joerg Exp $ +$NetBSD: distinfo,v 1.4 2013/08/09 18:15:18 riastradh Exp $ SHA1 (bmon-2.0.1.tar.gz) = ef6297bbd7a5f9a351e14b2b3e9f45157b136a9c RMD160 (bmon-2.0.1.tar.gz) = fa4f98fbf0810ae67af4aaa236f1eccdfef054b5 Size (bmon-2.0.1.tar.gz) = 110024 bytes SHA1 (patch-aa) = 1b737dc493506f374ed8e5732f922225f2c4d8c1 SHA1 (patch-man-bmon.1) = c403b723618ebb47faf363a8d56d4257cefddcd1 +SHA1 (patch-src_in_sysctl.c) = 39d1f11dd97efcdf408b97b554ab897ba0bdaa65 diff --git a/net/bmon/patches/patch-src_in_sysctl.c b/net/bmon/patches/patch-src_in_sysctl.c new file mode 100644 index 00000000000..819a3ee2b47 --- /dev/null +++ b/net/bmon/patches/patch-src_in_sysctl.c @@ -0,0 +1,28 @@ +$NetBSD: patch-src_in_sysctl.c,v 1.1 2013/08/09 18:15:18 riastradh Exp $ + +Null-terminate interface names, in case the first octet of the +link-layer address is not zero (as many MAC addresses used to have). + +--- src/in_sysctl.c.orig 2004-10-31 14:33:19.000000000 +0000 ++++ src/in_sysctl.c +@@ -67,6 +67,7 @@ sysctl_read(void) + for (next = buf; next < lim; ) { + struct if_msghdr *ifm, *nextifm; + struct sockaddr_dl *sdl; ++ char *name; + intf_t *i; + + ifm = (struct if_msghdr *) next; +@@ -93,7 +94,11 @@ sysctl_read(void) + if (c_debug) + fprintf(stderr, "Processing %s\n", sdl->sdl_data); + +- i = lookup_intf(get_local_node(), sdl->sdl_data, 0, 0); ++ name = xcalloc(1, sdl->sdl_nlen + 1); ++ (void)memcpy(name, sdl->sdl_data, sdl->sdl_nlen); ++ name[sdl->sdl_nlen] = 0; ++ i = lookup_intf(get_local_node(), name, 0, 0); ++ xfree(name); + + if (NULL == i) + continue; |