AlmirKadric-Published / docker-tuntap-osx

A tuntap shim installer for "Docker for Mac"
MIT License
332 stars 65 forks source link

Is there any alternative to tuntap osx? #40

Open im-kulikov opened 3 years ago

im-kulikov commented 3 years ago
  1. Apple M1 doesn't support tuntap-osx (not my case)
  2. Apple deprecates tuntap kexts (all cases)
  3. There're some bugs that would not be fixed in tuntap-osx (latest update 2015 year) and sometimes it cases reboot of macOS 11 (x64 cpu) and system removes tun/tap kexts and plist files of tuntap-osx

So, is there any alternatives for tuntap-osx?

im-kulikov commented 3 years ago

Example of kernel panic

panic(cpu 0 caller 0xffffff80040a8e98): "lck_rw_unlock_shared(): lock 0xffffff8004c50914 held in mode: 2\n"@/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/xnu/xnu-7195.60.75/osfmk/i386/locks_i386.c:1461
Backtrace (CPU 0), Frame : Return Address
0xffffffb0c57fbc30 : 0xffffff8003cb9aed 
0xffffffb0c57fbc80 : 0xffffff8003dfc6e3 
0xffffffb0c57fbcc0 : 0xffffff8003decd1a 
0xffffffb0c57fbd10 : 0xffffff8003c5ea2f 
0xffffffb0c57fbd30 : 0xffffff8003cb938d 
0xffffffb0c57fbe50 : 0xffffff8003cb9678 
0xffffffb0c57fbec0 : 0xffffff80044be3ca 
0xffffffb0c57fbf30 : 0xffffff80040a8e98 
0xffffffb0c57fbfa0 : 0xffffff8003c5e13e 

Process name corresponding to current thread: kernel_task

Mac OS version:
20C69

Kernel version:
Darwin Kernel Version 20.2.0: Wed Dec  2 20:39:59 PST 2020; root:xnu-7195.60.75~1/RELEASE_X86_64
Kernel UUID: 82E2050C-5936-3D24-AD3B-EC4EC5C09E11
KernelCache slide: 0x0000000003a00000
KernelCache base:  0xffffff8003c00000
Kernel slide:      0x0000000003a10000
Kernel text base:  0xffffff8003c10000
__HIB  text base: 0xffffff8003b00000
System model name: MacBookPro14,3 (Mac-551B86E5744E2388)
System shutdown begun: NO
Panic diags file available: YES (0x0)
Hibernation exit count: 0

System uptime in nanoseconds: 110838193536225
Last Sleep:           absolute           base_tsc          base_nano
  Uptime  : 0x000064ce87274180
  Sleep   : 0x0000000000000000 0x0000000000000000 0x0000000000000000
  Wake    : 0x0000000000000000 0x0000000d1fb646b6 0x0000000000000000
last started kext at 37166703971568: >usb.cdc.acm   5.0.0 (addr 0xffffff7fa410b000, size 8192)
loaded kexts:
net.tunnelblick.tun 5300.3
net.tunnelblick.tap 5300.3
@filesystems.smbfs  3.4.1
>AudioAUUC  1.70
>AGPM   119
>X86PlatformShim    1.0.0
>!APlatformEnabler  2.7.0d0
@fileutil   20.036.15
@filesystems.autofs 3.0
>!AHIDALSService    1
@kext.AMDFramebuffer    4.0.2
@kext.AMDRadeonServiceManager   4.0.2
@kext.AMDRadeonX4000    4.0.2
>!AUpstreamUserClient   3.6.8
>!AGraphicsDevicePolicy 6.2.2
@AGDCPluginDisplayMetrics   6.2.2
>pmtelemetry    1
>LuaHardwareAccess  1.0.16
|IOUserEthernet 1.0.1
>usb.!UUserHCI  1
|IO!BSerialManager  8.0.2f9
@Dont_Steal_Mac_OS_X    7.0.0
>!AHV   1
>!ADiskImages2  1
>ACPI_SMC_PlatformPlugin    1.0.0
>!A!IKBLGraphics    16.0.1
>AGDCBacklightControl   6.2.2
>!AGFXHDA   100.1.431
>!A!IPCHPMC 2.0.1
>!ABacklight    180.3
>!AEmbeddedOSSupportHost    1
>!AHDAHardwareConfigDriver  283.15
>eficheck   1
>!A!ISlowAdaptiveClocking   4.0.0
>!AMuxControl   6.2.2
>!AHDA  283.15
@kext.AMD9500!C 4.0.2
>SMCMotionSensor    3.0.4d1
>!A!IKBLGraphicsFramebuffer 16.0.1
>!AMCCSControl  1.14
>!AThunderboltIP    4.0.3
>!AFIVRDriver   4.1.0
>usb.!UHostBillboardDevice  1.0
>!AFileSystemDriver 3.0.1
@filesystems.tmpfs  1
@filesystems.hfs.kext   556.60.1
@BootCache  40
@!AFSCompression.!AFSCompressionTypeZlib    1.0.0
@!AFSCompression.!AFSCompressionTypeDataless    1.0.0d1
>!ATopCaseHIDEventDriver    4020.6
>AirPort.BrcmNIC    1400.1.1
@filesystems.apfs   1677.60.23
@private.KextAudit  1.0
>!ASmartBatteryManager  161.0.0
>!AACPIButtons  6.1
>!ARTC  2.0
>!ASMBIOS   2.1
>!AACPIEC   6.1
>!AAPIC 1.7
@!ASystemPolicy 2.0.0
@nke.applicationfirewall    310
|IOKitRegistryCompatibility 1
|EndpointSecurity   1
>usb.cdc.acm    5.0.0
>usb.serial 6.0.0
>!UMergeNub 900.4.2
@kext.triggers  1.0
@kext.AMDRadeonX4100HWLibs  1.0
@kext.AMDRadeonX4000HWServices  4.0.2
|IOAVB!F    900.12
>IOPlatformPluginLegacy 1.0.0
|IO!BHost!CUARTTransport    8.0.2f9
|IO!BHost!CTransport    8.0.2f9
>!ABacklightExpert  1.1.0
@plugin.IOgPTPPlugin    900.11
|IOEthernetAVB!C    1.1.0
>X86PlatformPlugin  1.0.0
>IOPlatformPlugin!F 6.0.0d8
>!ASMBusPCI 1.0.14d1
>!A!ILpssUARTv1 3.0.60
>!A!ILpssUARTCommon 3.0.60
>!AOnboardSerial    1.0
|IOSerial!F 11
@!AGPUWrangler  6.2.2
|IOSlowAdaptiveClocking!F   1.0.0
>!AGraphicsControl  6.2.2
>DspFuncLib 283.15
@kext.OSvKernDSPLib 529
|IONDRVSupport  585
@kext.AMDSupport    4.0.2
|IOAccelerator!F2   439.52
@!AGraphicsDeviceControl    6.2.2
>!AHDA!C    283.15
|IOHDA!F    283.15
|IOAudio!F  300.6.1
@vecLib.kext    1.2.0
|IOGraphics!F   585
>!ASMBus!C  1.0.18d1
>!AThunderboltEDMSink   5.0.3
>!AThunderboltDPOutAdapter  8.1.4
>usb.IOUSBHostHIDDevice 1.2
>usb.cdc.ecm    5.0.0
>usb.cdc.ncm    5.0.0
>usb.!UiBridge  1.0
>usb.cdc    5.0.0
>usb.networking 5.0.0
>usb.!UHostCompositeDevice  1.2
>usb.!UHub  1.2
>!AThunderboltDPInAdapter   8.1.4
>!AThunderboltDPAdapter!F   8.1.4
>!AThunderboltPCIDownAdapter    4.1.1
>!ABSDKextStarter   3
|IOSurface  289.3
@filesystems.hfs.encodings.kext 1
>!AActuatorDriver   4400.28
>!AHIDKeyboard  222
>!AMultitouchDriver 4400.28
>!AInputDeviceSupport   4400.35
>!AHS!BDriver   4020.6
>IO!BHIDDriver  8.0.2f9
>!AHSSPIHIDDriver   61
>!AHSSPISupport 61
|IO80211!F  1200.12.2b1
|IOSkywalk!F    1
>mDNSOffloadUserClient  1.0.1b8
>corecapture    1.0.4
>!A!ILpssSpi!C  3.0.60
>!AXsanScheme   3
|IONVMe!F   2.1.0
>!AThunderboltNHI   7.2.8
>!AHPM  3.4.4
|IOThunderbolt!F    9.3.2
>!A!ILpssI2C!C  3.0.60
>!A!ILpssDmac   3.0.60
>!A!ILpssI2C    3.0.60
>!A!ILpssGspi   3.0.60
>usb.!UXHCIPCI  1.2
>usb.!UXHCI 1.2
>usb.!UHostPacketFilter 1.0
|IOUSB!F    900.4.2
>!AEFINVRAM 2.1
>!AEFIRuntime   2.1
|IOSMBus!F  1.1
|IOHID!F    2.0.0
$!AImage4   3.0.0
|IOTimeSync!F   900.11
|IONetworking!F 3.4
>DiskImages 493.0.0
|IO!B!F 8.0.2f9
|IOReport!F 47
|IO!BPacketLogger   8.0.2f9
$quarantine 4
$sandbox    300.0
@kext.!AMatch   1.0.0d1
|CoreAnalytics!F    1
>!ASSE  1.0
>!AKeyStore 2
>!UTDM  511.60.2
|IOUSBMass!SDriver  184.40.6
|IOSCSIBlockCommandsDevice  436.40.6
|IO!S!F 2.1
|IOSCSIArchitectureModel!F  436.40.6
>!AMobileFileIntegrity  1.0.5
@kext.CoreTrust 1
>!AFDEKeyStore  28.30
>!AEffaceable!S 1.0
>!ACredentialManager    1.0
>KernelRelayHost    1
|IOUSBHost!F    1.2
>!UHostMergeProperties  1.2
>usb.!UCommon   1.0
>!ABusPower!C   1.0
>!ASEPManager   1.0.1
>IOSlaveProcessor   1
>!AACPIPlatform 6.1
>!ASMC  3.1.9
|IOPCI!F    2.9
|IOACPI!F   1.4
>watchdog   1
@kec.pthread    1
@kec.corecrypto 11.1
@kec.Libm   1
gitrojones commented 2 years ago

We haven't been able to find a drop-in equivalent for our M1 machines. With that said, a good alternative has been setting up an ovpn container to run in docker and using Tunnelblick to connect with our needed CIDR ranges. Not as ideal as a proper host bridge but its pretty close.