aboutgitcodebugslistschat
path: root/contrib/selinux/passt.te
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2023-08-11 15:12:17 +1000
committerStefano Brivio <sbrivio@redhat.com>2023-08-13 17:29:40 +0200
commit28877b0fcdde7bd5c7ff3fc9305fc28ad9ba17cf (patch)
tree6dc04bab9e1466924afd51559dcc4a704a295673 /contrib/selinux/passt.te
parentb2bea0047db4ffdca04ab4f8b395903dc808fe9f (diff)
downloadpasst-28877b0fcdde7bd5c7ff3fc9305fc28ad9ba17cf.tar
passt-28877b0fcdde7bd5c7ff3fc9305fc28ad9ba17cf.tar.gz
passt-28877b0fcdde7bd5c7ff3fc9305fc28ad9ba17cf.tar.bz2
passt-28877b0fcdde7bd5c7ff3fc9305fc28ad9ba17cf.tar.lz
passt-28877b0fcdde7bd5c7ff3fc9305fc28ad9ba17cf.tar.xz
passt-28877b0fcdde7bd5c7ff3fc9305fc28ad9ba17cf.tar.zst
passt-28877b0fcdde7bd5c7ff3fc9305fc28ad9ba17cf.zip
tap: Clean up tap reset path
In tap_handler() if we get an error on the tap device or socket, we use tap_sock_init() to re-initialise it. However, what we actually need for this reset case has remarkably little in common with the case where we're initialising for the first time: * Re-initialising the packet pools is unnecessary * The case of a passed in fd (--fd) isn't relevant * We don't even call this for pasta mode * We will never re-call tap_sock_unix_init() because we never clear fd_tap_listen In fact the only thing we do in tap_sock_init() relevant to the reset case is to remove the fd from the epoll and close it... which isn't used in the first initialisation case. So make a new tap_sock_reset() function just for this case, and simplify tap_sock_init() slightly as being used only for the first time case. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'contrib/selinux/passt.te')
0 files changed, 0 insertions, 0 deletions