Opened 13 years ago

Closed 9 years ago

#87 closed Bug / Defect (fixed)

OpenVPN continue work with invalid socket

Reported by: Aleksey Vasenev Owned by:
Priority: major Milestone:
Component: Networking Version: OpenVPN 2.1.4 (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords: socket udp tcp windows
Cc:

Description

Windows 7

OpenVPN must close socket (and possible recreate it) if some socket functions (WSARecvFrom, WSARecv, WSASendTo, WSASend, WSAGetOverlappedResult) return WSAECONNRESET.

I see in source code that socket_connection_reset return true for TCP sockets only, but this error may occure for UDP also:
http://msdn.microsoft.com/en-us/library/ms741686(v=vs.85).aspx
"The application should close the socket as it is no longer usable. For a UPD datagram socket, this error would indicate that a previous send operation resulted in an ICMP "Port Unreachable" message."

Server config:
dev tap
ifconfig 10.7.34.1 255.255.255.0
secret secret.key
comp-lzo
ping 10

Client config:
dev tap
ifconfig 10.7.34.2 255.255.255.0
secret secret.key
remote xxx.homeip.net
comp-lzo
ping 10
ping-restart 60

Server has dynamic IP address. Client behind NAT.

When server change IP address, in client log I see WSAECONNRESET error. Using verb 11 I found that WSAGetOverlappedResult (only one call in sources) return this error.

After client restart all works ok. I think OpenVPN must restart connection if see WSAECONNRESET error.

Change History (7)

comment:1 Changed 13 years ago by Aleksey Vasenev

I choose invalid component, but can't change.

comment:2 Changed 11 years ago by Samuli Seppänen

Component: Building / CompilingNetworking

comment:3 Changed 11 years ago by Samuli Seppänen

Keywords: socket udp added

comment:4 Changed 11 years ago by Samuli Seppänen

Keywords: tcp added

comment:5 Changed 11 years ago by Samuli Seppänen

Keywords: windows added

comment:6 Changed 10 years ago by Samuli Seppänen

Can this be reproduced on Git "master" or latest official release (currently 2.3.2)?

comment:7 Changed 9 years ago by Samuli Seppänen

Resolution: fixed
Status: newclosed

This bug has been reported against a really old version of OpenVPN and nobody has reproduced it on a recent OpenVPN release. Closing.

Note: See TracTickets for help on using tickets.