From d9bcdd6d0a3d4515e21b95a95072b43a4ecc6073 Mon Sep 17 00:00:00 2001 From: dg Date: Sat, 8 Jun 1996 06:12:58 +0000 Subject: Fix bug in bpf_ifname() where the unit didn't get added correctly to the name string. This function should be rewritten to deal with more than 10 units of a given type. Pointed out by: jmf@free-gate.com (Jean-Marc Frailong) (I fixed it slightly differently) --- sys/net/bpf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/net') diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 4d63b1b..e903b68 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -37,7 +37,7 @@ * * @(#)bpf.c 8.2 (Berkeley) 3/28/94 * - * $Id: bpf.c,v 1.23 1996/03/28 14:33:11 scrappy Exp $ + * $Id: bpf.c,v 1.24 1996/04/07 17:32:23 bde Exp $ */ #include "bpfilter.h" @@ -980,6 +980,7 @@ bpf_ifname(ifp, ifr) while (*d++ = *s++) continue; + d--; /* back to the null */ /* XXX Assume that unit number is less than 10. */ *d++ = ifp->if_unit + '0'; *d = '\0'; -- cgit v1.1