summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorcjc <cjc@FreeBSD.org>2003-02-02 22:06:56 +0000
committercjc <cjc@FreeBSD.org>2003-02-02 22:06:56 +0000
commit38d195389fb123bd58afdbdb839a807fd76a5ded (patch)
tree6966a158b835c734803d12c09006d3a012ab2762 /sys
parent0aa1a2dc66fe484d27474fb131b3cbfc17c11afe (diff)
downloadFreeBSD-src-38d195389fb123bd58afdbdb839a807fd76a5ded.zip
FreeBSD-src-38d195389fb123bd58afdbdb839a807fd76a5ded.tar.gz
Add the TCP flags to the log message whenever log_in_vain is 1, not
just when set to 2. PR: kern/43348 MFC after: 5 days
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/tcp_input.c11
-rw-r--r--sys/netinet/tcp_reass.c11
2 files changed, 6 insertions, 16 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 95ce552..c42d1ad 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -605,17 +605,12 @@ findpcb:
}
switch (log_in_vain) {
case 1:
- if (thflags & TH_SYN)
- log(LOG_INFO,
- "Connection attempt to TCP %s:%d "
- "from %s:%d\n",
- dbuf, ntohs(th->th_dport), sbuf,
- ntohs(th->th_sport));
- break;
+ if ((thflags & TH_SYN) == 0)
+ break;
case 2:
log(LOG_INFO,
"Connection attempt to TCP %s:%d "
- "from %s:%d flags:0x%x\n",
+ "from %s:%d flags:0x%02x\n",
dbuf, ntohs(th->th_dport), sbuf,
ntohs(th->th_sport), thflags);
break;
diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c
index 95ce552..c42d1ad 100644
--- a/sys/netinet/tcp_reass.c
+++ b/sys/netinet/tcp_reass.c
@@ -605,17 +605,12 @@ findpcb:
}
switch (log_in_vain) {
case 1:
- if (thflags & TH_SYN)
- log(LOG_INFO,
- "Connection attempt to TCP %s:%d "
- "from %s:%d\n",
- dbuf, ntohs(th->th_dport), sbuf,
- ntohs(th->th_sport));
- break;
+ if ((thflags & TH_SYN) == 0)
+ break;
case 2:
log(LOG_INFO,
"Connection attempt to TCP %s:%d "
- "from %s:%d flags:0x%x\n",
+ "from %s:%d flags:0x%02x\n",
dbuf, ntohs(th->th_dport), sbuf,
ntohs(th->th_sport), thflags);
break;
OpenPOWER on IntegriCloud