net: tcp: Check pkt before sending RESET
In certain TCP states we should not try to send RESET segment to peer. So check this and do not try to use NULL pkt to send a message. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
fc125e0e2c
commit
286139e13b
1 changed files with 1 additions and 1 deletions
|
@ -778,7 +778,7 @@ static int send_reset(struct net_context *context,
|
|||
int ret;
|
||||
|
||||
ret = net_tcp_prepare_reset(context->tcp, remote, &pkt);
|
||||
if (ret) {
|
||||
if (ret || !pkt) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue