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
This commit is contained in:
cjc 2003-02-02 22:06:56 +00:00
parent 0aa1a2dc66
commit 38d195389f
2 changed files with 6 additions and 16 deletions

View File

@ -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;

View File

@ -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;