diff --git a/net/tcp/tcp_finddev.c b/net/tcp/tcp_finddev.c index a863ca7188..35879fdaff 100644 --- a/net/tcp/tcp_finddev.c +++ b/net/tcp/tcp_finddev.c @@ -81,7 +81,7 @@ static int tcp_find_ipv4_device(FAR struct tcp_conn_s *conn, return OK; } - return -EINVAL; + return -ECONNREFUSED; } /* We need to select the device that is going to route the TCP packet @@ -137,7 +137,7 @@ static int tcp_find_ipv6_device(FAR struct tcp_conn_s *conn, return OK; } - return -EINVAL; + return -ECONNREFUSED; } /* We need to select the device that is going to route the TCP packet