Skip to content
Commit 3b4b99af authored by Subash Abhinov Kasiviswanathan's avatar Subash Abhinov Kasiviswanathan
Browse files

netmgrd: Enable support for destroying TCP sockets through diag

This enables the SOCK_DESTROY feature for TCP sockets. When changing
networks, this is needed to close all blocking calls on existing
sockets and return ECONNABORTED and close the socket gracefully.
The other end of the connection is sent a RST to notify this event.

This feature was earlier implemented using IOCTL SIOCKILLADDR and
called a custom function tcp_nuke_addr internally. This
functionality will be deprecated going forward in favor of
SOCK_DESTROY.

Add support for netmgrd to use this method of destroying sockets.
Fix the following denial -

[   26.041163] type=1400 audit(1471467994.893:67): avc: denied
{ create } for pid=1548 comm="netmgrd" scontext=u:r:netmgrd:s0
tcontext=u:r:netmgrd:s0 tclass=netlink_tcpdiag_socket permissive=0

CRs-Fixed: 1056052
Change-Id: Ic2ff9b497d7a0b0dca91b72c328b3eb5cda17cce
parent fba8951f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment