net/smc: sync err code when tcp connection was refused
In the current implementation, when TCP initiates a connection to an unavailable [ip,port], ECONNREFUSED will be stored in the TCP socket, but SMC will not. However, some apps (like curl) use getsockopt(,,SO_ERROR,,) to get the error information, which makes them miss the error message and behave strangely. Fixes: 50717a37 ("net/smc: nonblocking connect rework") Signed-off-by: Nliuyacan <liuyacan@corp.netease.com> Reviewed-by: NTony Lu <tonylu@linux.alibaba.com> Acked-by: NKarsten Graul <kgraul@linux.ibm.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Showing
想要评论请 注册 或 登录