When a tun file descriptor is closed, and there are no other file descriptors associated to the tun device, the next_tx field of the tun struct should be cleared; in addition, the network interface output function should check if the next_tx field points to a valid file descriptor.
This change fixes an unhandled fault that occurs when closing a file descriptor on a tun device that has open TCP connections. Closes #2061.
When a tun file descriptor is closed, and there are no other file descriptors associated to the tun device, the
next_tx
field of the tun struct should be cleared; in addition, the network interface output function should check if thenext_tx
field points to a valid file descriptor. This change fixes an unhandled fault that occurs when closing a file descriptor on a tun device that has open TCP connections. Closes #2061.