Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Jan 2003 22:13:13 -0800
From:      "Crist J. Clark" <crist.clark@attbi.com>
To:        Mike Silbersack <silby@FreeBSD.org>
Cc:        freebsd-bugs@FreeBSD.org, Gregory Bond <gnb@itga.com.au>
Subject:   Re: kern/43348: PATCH: make tcp.log_in_vain distinguish SYN from SYN-ACK
Message-ID:  <20030128061313.GB42960@blossom.cjclark.org>
In-Reply-To: <200301250056.h0P0uZqq062114@freefall.freebsd.org>
References:  <200301250056.h0P0uZqq062114@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jan 24, 2003 at 04:56:35PM -0800, Mike Silbersack wrote:
> Synopsis: PATCH: make tcp.log_in_vain distinguish SYN from SYN-ACK
> 
> Responsible-Changed-From-To: freebsd-bugs->silby
> Responsible-Changed-By: silby
> Responsible-Changed-When: Fri Jan 24 16:56:20 PST 2003
> Responsible-Changed-Why: 
> Ok, I'll take a stab at this.

Wouldn't it be easier just to add the TCP flags of the offending
packet to the log entry like we do for 2?

Index: /export/freebsd/CURRENT/src/sys/netinet/tcp_input.c
===================================================================
RCS file: /export/freebsd/ncvs/src/sys/netinet/tcp_input.c,v
retrieving revision 1.187
diff -u -r1.187 tcp_input.c
--- /export/freebsd/CURRENT/src/sys/netinet/tcp_input.c	13 Jan 2003 11:01:19 -0000	1.187
+++ /export/freebsd/CURRENT/src/sys/netinet/tcp_input.c	28 Jan 2003 06:10:59 -0000
@@ -608,9 +608,9 @@
 				if (thflags & TH_SYN)
 					log(LOG_INFO,
 					    "Connection attempt to TCP %s:%d "
-					    "from %s:%d\n",
+					    "from %s:%d flags: 0x%02x\n",
 					    dbuf, ntohs(th->th_dport), sbuf,
-					    ntohs(th->th_sport));
+					    ntohs(th->th_sport), thflags);
 				break;
 			case 2:
 				log(LOG_INFO,

-- 
Crist J. Clark                     |     cjclark@alum.mit.edu
                                   |     cjclark@jhu.edu
http://people.freebsd.org/~cjc/    |     cjc@freebsd.org

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030128061313.GB42960>