Skip to content

Conversation

anisse
Copy link
Contributor

@anisse anisse commented Oct 14, 2023

It is implemented on top of SockDiagMessage, and allows using Linux's CONFIG_INET_DIAG_DESTROY feature to close an arbitrary socket.

A long running, but buggy process might have hanging sockets kept alive by error. Using SOCK_DESTROY allows closing arbitrary sockets as root; an example tool that uses this feature and this crate is at: https://github.com/anisse/tcpkill

This PR should replace this one: little-dude/netlink#283

@codecov
Copy link

codecov bot commented Oct 14, 2023

Codecov Report

Attention: Patch coverage is 0% with 23 lines in your changes missing coverage. Please review.

Project coverage is 38.31%. Comparing base (f5f4ad7) to head (6b9660d).

Files with missing lines Patch % Lines
src/message.rs 0.00% 23 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #15      +/-   ##
==========================================
- Coverage   39.34%   38.31%   -1.04%     
==========================================
  Files          11       11              
  Lines         854      877      +23     
==========================================
  Hits          336      336              
- Misses        518      541      +23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

It is implemented on top of SockDiagMessage, and allows using Linux's
CONFIG_INET_DIAG_DESTROY feature to close an arbitrary socket.

A long running, but buggy process might have hanging sockets kept alive
by error. Using SOCK_DESTROY allows closing arbitrary sockets as root;
an example tool that uses this feature and this crate is at:
https://github.com/anisse/tcpkill
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant