From owner-freebsd-net@FreeBSD.ORG Wed Jan 21 13:49:19 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 04BA716A4CE; Wed, 21 Jan 2004 13:49:19 -0800 (PST) Received: from Awfulhak.org (awfulhak.demon.co.uk [80.177.173.150]) by mx1.FreeBSD.org (Postfix) with ESMTP id 13C7243D1F; Wed, 21 Jan 2004 13:49:17 -0800 (PST) (envelope-from brian@Awfulhak.org) Received: from mail.lan.Awfulhak.org (brian@dev.lan.Awfulhak.org [172.16.0.5]) by Awfulhak.org (8.12.10/8.12.10) with SMTP id i0LLnAoC073204; Wed, 21 Jan 2004 21:49:10 GMT (envelope-from brian@Awfulhak.org) Date: Wed, 21 Jan 2004 21:49:10 +0000 From: Brian Somers To: Brooks Davis Message-Id: <20040121214910.23764671@dev.lan.Awfulhak.org> In-Reply-To: <20040121210152.GA21939@Odin.AC.HMC.Edu> References: <20040121210152.GA21939@Odin.AC.HMC.Edu> X-Mailer: Sylpheed version 0.9.8claws (GTK+ 1.2.10; i386-portbld-freebsd5.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.61 X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on gw.lan.Awfulhak.org cc: brian@freebsd.org cc: net@freebsd.org Subject: Re: 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:49:19 -0000 Yep, that's a bug... feel free to apply the patch. Cheers. On Wed, 21 Jan 2004 13:01:52 -0800, Brooks Davis wrote: > 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 > =================================================================== > 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) == > (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); > > -- > 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 > -- Brian Don't _EVER_ lose your sense of humour !