From owner-freebsd-net@FreeBSD.ORG Wed Jan 21 13:02:02 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2317A16A4CE; Wed, 21 Jan 2004 13:02:02 -0800 (PST) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id D36E243D68; Wed, 21 Jan 2004 13:02:00 -0800 (PST) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (IDENT:brdavis@localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.12.10/8.12.3) with ESMTP id i0LL1qaT024167; Wed, 21 Jan 2004 13:01:52 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.12.10/8.12.3/Submit) id i0LL1qPZ024164; Wed, 21 Jan 2004 13:01:52 -0800 Date: Wed, 21 Jan 2004 13:01:52 -0800 From: Brooks Davis To: net@freebsd.org Message-ID: <20040121210152.GA21939@Odin.AC.HMC.Edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5vNYLRcllDrimb99" Content-Disposition: inline User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-milter (http://amavis.org/) on odin.ac.hmc.edu cc: brian@freebsd.org Subject: minor bug in user ppp? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2004 21:02:02 -0000 --5vNYLRcllDrimb99 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I'm reviewing uses of sdl->sdl_data so see if I can make a minor change to the way that data is stored and I noticed what I think is a bug in the userland ppp implementation. It looks like it's trying to print the interface name from the sdl, but the precision specifier is wrong. A simpiler printf a little ways above this one appears to be correct. I'm I correct that this is a bug? See the patch below. -- Brooks Index: usr.sbin/ppp/arp.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /usr/cvs/src/usr.sbin/ppp/arp.c,v retrieving revision 1.44 diff -u -p -r1.44 arp.c --- usr.sbin/ppp/arp.c 16 Jan 2002 14:03:51 -0000 1.44 +++ usr.sbin/ppp/arp.c 21 Jan 2004 20:49:42 -0000 @@ -302,7 +302,7 @@ arp_EtherAddr(int s, struct in_addr ipad if ((ifa->sin_addr.s_addr & netmask->sin_addr.s_addr) =3D=3D (ipaddr.s_addr & netmask->sin_addr.s_addr)) { log_Printf(verbose ? LogPHASE : LogDEBUG, - "Found interface %.*s for %s\n", dl->sdl_alen, + "Found interface %.*s for %s\n", dl->sdl_nlen, dl->sdl_data, inet_ntoa(ipaddr)); memcpy(hwaddr, dl, dl->sdl_len); free(buf); --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --5vNYLRcllDrimb99 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFADuimXY6L6fI4GtQRAn9lAKCzClKupAeFZlWJsTtVAkCUualMMwCfSBsp Y+g+LYYAIz6uM7dc8bb9xAo= =izvY -----END PGP SIGNATURE----- --5vNYLRcllDrimb99--