potential for bug

This commit is contained in:
JackDoan
2026-04-20 11:09:29 -05:00
parent 0f27b81f19
commit f34e8fe0e6
14 changed files with 77 additions and 6 deletions

View File

@@ -41,6 +41,10 @@ func (t *tun) ReadBatch() ([][]byte, error) {
return t.batchRet[:], nil
}
func (t *tun) WriteReject(p []byte) (int, error) {
return t.Write(p)
}
func newTunFromFd(c *config.C, l *logrus.Logger, deviceFd int, vpnNetworks []netip.Prefix) (*tun, error) {
// XXX Android returns an fd in non-blocking mode which is necessary for shutdown to work properly.
// Be sure not to call file.Fd() as it will set the fd to blocking mode.