Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_input.c
| Show First 20 Lines • Show All 1,186 Lines • ▼ Show 20 Lines | if ((thflags & TH_SYN) == 0) { | ||||
| goto dropunlock; | goto dropunlock; | ||||
| } | } | ||||
| /* | /* | ||||
| * (SYN|ACK) is bogus on a listen socket. | * (SYN|ACK) is bogus on a listen socket. | ||||
| */ | */ | ||||
| if (thflags & TH_ACK) { | if (thflags & TH_ACK) { | ||||
| if ((s = tcp_log_addrs(&inc, th, NULL, NULL))) | if ((s = tcp_log_addrs(&inc, th, NULL, NULL))) | ||||
| log(LOG_DEBUG, "%s; %s: Listen socket: " | log(LOG_DEBUG, "%s; %s: Listen socket: " | ||||
| "SYN|ACK invalid, segment rejected\n", | "SYN|ACK invalid, segment ignored\n", | ||||
| s, __func__); | s, __func__); | ||||
| syncache_badack(&inc, port); /* XXX: Not needed! */ | |||||
| TCPSTAT_INC(tcps_badsyn); | TCPSTAT_INC(tcps_badsyn); | ||||
| goto dropwithreset; | goto dropunlock; | ||||
| } | } | ||||
| /* | /* | ||||
| * If the drop_synfin option is enabled, drop all | * If the drop_synfin option is enabled, drop all | ||||
| * segments with both the SYN and FIN bits set. | * segments with both the SYN and FIN bits set. | ||||
| * This prevents e.g. nmap from identifying the | * This prevents e.g. nmap from identifying the | ||||
| * TCP/IP stack. | * TCP/IP stack. | ||||
| * XXX: Poor reasoning. nmap has other methods | * XXX: Poor reasoning. nmap has other methods | ||||
| * and is constantly refining its stack detection | * and is constantly refining its stack detection | ||||
| ▲ Show 20 Lines • Show All 2,985 Lines • Show Last 20 Lines | |||||