Date: Wed, 21 Jan 2004 13:01:52 -0800 From: Brooks Davis <brooks@one-eyed-alien.net> To: net@freebsd.org Cc: brian@freebsd.org Subject: minor bug in user ppp? Message-ID: <20040121210152.GA21939@Odin.AC.HMC.Edu>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
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
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQFADuimXY6L6fI4GtQRAn9lAKCzClKupAeFZlWJsTtVAkCUualMMwCfSBsp
Y+g+LYYAIz6uM7dc8bb9xAo=
=izvY
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040121210152.GA21939>
