libpcap icon indicating copy to clipboard operation
libpcap copied to clipboard

rpcap: add timeout configuration on socket connect

Open GabrielGanne opened this issue 3 years ago • 6 comments

Hi,

This is a small proposal to allow to configure the connection timeout for rpcap sockets. This is just to avoid waiting minutes for nothing should the connect() call fail.

Best regards,

GabrielGanne avatar Feb 14 '22 10:02 GabrielGanne

Thank you for preparing these changes and addressing the CI feedback. Please do not include the regenerated configure script into the commits.

infrastation avatar Feb 14 '22 13:02 infrastation

Thank you for preparing these changes and addressing the CI feedback. Please do not include the regenerated configure script into the commits.

Done. Sorry, I forgot to clean them out of the PR.

GabrielGanne avatar Feb 14 '22 13:02 GabrielGanne

The second commit ("rpcap: set keepalives on rpcap's control socket") is almost an exact copy of the changes from pull request #773, which still requires significant work to become good for merging (see the detailed comments there).

infrastation avatar Feb 15 '22 11:02 infrastation

Hi @infrastation Makes sense since it's the same original author. I should have seen it, sorry about that.

I'm willing to take over #773 and do the requested changes. I'll also remove that commit from here.

GabrielGanne avatar Feb 15 '22 13:02 GabrielGanne

@GabrielGanne, please go ahead with your version of the TCP keepalive patch.

infrastation avatar Sep 19 '22 20:09 infrastation

Does this work for rpcap-over-TLS connections?

guyharris avatar Sep 19 '22 20:09 guyharris