diff options
author | dg <dg@FreeBSD.org> | 1996-06-08 06:12:58 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1996-06-08 06:12:58 +0000 |
commit | d9bcdd6d0a3d4515e21b95a95072b43a4ecc6073 (patch) | |
tree | 27c24a080a09f5dcdf8a2056349d8bdcdd527e80 | |
parent | c8e7c06a293dc0edc05652ba5598309fa798e818 (diff) | |
download | FreeBSD-src-d9bcdd6d0a3d4515e21b95a95072b43a4ecc6073.zip FreeBSD-src-d9bcdd6d0a3d4515e21b95a95072b43a4ecc6073.tar.gz |
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)
-rw-r--r-- | sys/net/bpf.c | 3 |
1 files changed, 2 insertions, 1 deletions
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'; |