Bug in recent kernel's ipmon?

Fred Souza fred at storming.org
Fri Dec 12 14:28:52 PST 2003


Hello again,

  I've found the error. There's a variable, fl_unit, in the struct
  ipflog, that's appended to fl_ifname when printing the log line. The
  problem is, fl_ifname already has the data fl_unit was supposed to
  carry (and apparently it's not doing that, either).

  I'm not positive if my patch to it is the best one to follow, but it
  works for me. I've attached it, in case someone else is getting the
  same kind of error.


  Fred


-- 
"I don't know who my grandfather was; I am much more concerned to know
what his grandson will be."
		-- Abraham Lincoln
-------------- next part --------------
--- ipmon.c.orig	Fri Dec 12 20:18:24 2003
+++ ipmon.c	Fri Dec 12 20:17:42 2003
@@ -943,7 +943,7 @@
 			break;
 	if (ipf->fl_ifname[len])
 		len++;
-	(void) sprintf(t, "%*.*s%u", len, len, ipf->fl_ifname, ipf->fl_unit);
+	(void) sprintf(t, "%*.*s", len, len, ipf->fl_ifname);
 	t += strlen(t);
 #endif
 	if (ipf->fl_group == 0xffffffff)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20031212/7fda1ba5/attachment.bin


More information about the freebsd-current mailing list