mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-21 09:13:37 +00:00
Avoid unlocking the inp twice if badport_bandlim() returns -1.
Reported by: jlemon
This commit is contained in:
parent
09152a86ff
commit
6fd22caf91
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=98781
|
@ -2216,8 +2216,6 @@ tcp_input(m, off0)
|
|||
goto drop;
|
||||
/* IPv6 anycast check is done at tcp6_input() */
|
||||
|
||||
if (tp)
|
||||
INP_UNLOCK(inp);
|
||||
/*
|
||||
* Perform bandwidth limiting.
|
||||
*/
|
||||
|
@ -2229,6 +2227,10 @@ tcp_input(m, off0)
|
|||
tcp_trace(TA_DROP, ostate, tp, (void *)tcp_saveipgen,
|
||||
&tcp_savetcp, 0);
|
||||
#endif
|
||||
|
||||
if (tp)
|
||||
INP_UNLOCK(inp);
|
||||
|
||||
if (thflags & TH_ACK)
|
||||
/* mtod() below is safe as long as hdr dropping is delayed */
|
||||
tcp_respond(tp, mtod(m, void *), th, m, (tcp_seq)0, th->th_ack,
|
||||
|
|
|
@ -2216,8 +2216,6 @@ tcp_input(m, off0)
|
|||
goto drop;
|
||||
/* IPv6 anycast check is done at tcp6_input() */
|
||||
|
||||
if (tp)
|
||||
INP_UNLOCK(inp);
|
||||
/*
|
||||
* Perform bandwidth limiting.
|
||||
*/
|
||||
|
@ -2229,6 +2227,10 @@ tcp_input(m, off0)
|
|||
tcp_trace(TA_DROP, ostate, tp, (void *)tcp_saveipgen,
|
||||
&tcp_savetcp, 0);
|
||||
#endif
|
||||
|
||||
if (tp)
|
||||
INP_UNLOCK(inp);
|
||||
|
||||
if (thflags & TH_ACK)
|
||||
/* mtod() below is safe as long as hdr dropping is delayed */
|
||||
tcp_respond(tp, mtod(m, void *), th, m, (tcp_seq)0, th->th_ack,
|
||||
|
|
Loading…
Reference in a new issue