Re: [iproute PATCH v2 2/2] ss: support closing inet sockets via SOCK_DESTROY.

2015-12-22 Thread Lorenzo Colitti
On Tue, Dec 22, 2015 at 5:31 PM, Lorenzo Colitti wrote: > I've just uploaded a new version. The changes from v2 are as > follows: > [...] Also: as requested, kill is now a boolean instead of a bitfield inside a struct. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the bo

Re: [iproute PATCH v2 2/2] ss: support closing inet sockets via SOCK_DESTROY.

2015-12-22 Thread Lorenzo Colitti
I've just uploaded a new version. The changes from v2 are as follows: - Removed the superfluous inline keyword. - The code now ignores ENOENT from kill_inet_sock. This can happen if something else closed the socket during the scan, or if the user requests killing a socket that is not in the ha

Re: [iproute PATCH v2 2/2] ss: support closing inet sockets via SOCK_DESTROY.

2015-12-21 Thread Stephen Hemminger
On Thu, 17 Dec 2015 22:22:18 +0900 Lorenzo Colitti wrote: > diff --git a/misc/ss.c b/misc/ss.c > index 0dab32c..be70c41 100644 > --- a/misc/ss.c > +++ b/misc/ss.c > @@ -160,6 +160,9 @@ struct filter > int states; > int families; > struct ssfilter *f; > + struct { > +

Re: [iproute PATCH v2 2/2] ss: support closing inet sockets via SOCK_DESTROY.

2015-12-17 Thread Eric Dumazet
On Thu, 2015-12-17 at 22:22 +0900, Lorenzo Colitti wrote: > This patch adds a -K / --kill option to ss that attempts to > forcibly close matching sockets using SOCK_DESTROY. > > This is implemented by adding a new "struct action" to struct > filter. If necessary, this can be extended later on to s

[iproute PATCH v2 2/2] ss: support closing inet sockets via SOCK_DESTROY.

2015-12-17 Thread Lorenzo Colitti
This patch adds a -K / --kill option to ss that attempts to forcibly close matching sockets using SOCK_DESTROY. This is implemented by adding a new "struct action" to struct filter. If necessary, this can be extended later on to support further actions on sockets. Because ss typically prints sock