Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | wintun: registry: revise value reading | Simon Rozman | 2019-05-11 | 1 | -1/+1 |
| | | | | | | | | | | | | | | - Make getStringValueRetry() reusable for reading any value type. This merges code from GetIntegerValueWait(). - expandString() >> toString() and extend to support REG_MULTI_SZ (to return first value of REG_MULTI_SZ). Furthermore, doing our own UTF-16 to UTF-8 conversion works around a bug in windows/registry's GetStringValue() non-zero terminated string handling. - Provide toInteger() analogous to toString() - GetStringValueWait() tolerates and reads REG_MULTI_SZ too now. It returns REG_MULTI_SZ[0], making GetFirstStringValueWait() redundant. Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | wintun: call HrRenameConnection in another thread | Jason A. Donenfeld | 2019-05-10 | 1 | -2/+3 |
| | |||||
* | wintun: enumerate faster by using COMPATDRIVER instead of CLASSDRIVER | Jason A. Donenfeld | 2019-05-10 | 1 | -1/+1 |
| | |||||
* | wintun: destroy devinfolist after usage | Jason A. Donenfeld | 2019-05-10 | 1 | -0/+1 |
| | |||||
* | wintun: registry: replace REG_NOTIFY with NOTIFY | Simon Rozman | 2019-05-10 | 1 | -3/+3 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | wintun: IpConfig is a MULTI_SZ, and fix errors | Jason A. Donenfeld | 2019-05-10 | 1 | -44/+49 |
| | |||||
* | wintun: poll for device key | Jason A. Donenfeld | 2019-05-10 | 1 | -9/+10 |
| | | | | It's actually pretty hard to guess where it is. | ||||
* | wintun: fix scope of error object | Jason A. Donenfeld | 2019-05-10 | 1 | -5/+6 |
| | |||||
* | wintun: wait for interface registry key on device creation | Simon Rozman | 2019-05-10 | 1 | -67/+104 |
| | | | | | | By using RegNotifyChangeKeyValue(). Also disable dead gateway detection. Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | setupapi: safer aliasing of slice types | Jason A. Donenfeld | 2019-05-03 | 1 | -5/+1 |
| | |||||
* | wintun: don't retry when not creating | Jason A. Donenfeld | 2019-05-02 | 1 | -6/+23 |
| | | | | | | The only time we're trying to counteract the race condition is when we're creating a driver. When we're simply looking up all drivers, it doesn't make sense to retry. | ||||
* | windows: use proper constants from updated x/sys | Jason A. Donenfeld | 2019-04-13 | 1 | -4/+4 |
| | |||||
* | wintun: rename device using undocumented API that netsh.exe uses | Jason A. Donenfeld | 2019-04-01 | 1 | -1/+9 |
| | |||||
* | wintun: add more retry loops | Jason A. Donenfeld | 2019-04-01 | 1 | -18/+9 |
| | |||||
* | wintun: query for NetCfgInstanceId several times | Jason A. Donenfeld | 2019-03-22 | 1 | -5/+16 |
| | |||||
* | tun: windows: Make adapter rename asynchronous | Simon Rozman | 2019-03-22 | 1 | -55/+1 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | tun: windows: Adapter devices renamed to WINTUN<LUID Index> | Simon Rozman | 2019-03-22 | 1 | -17/+62 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | tun: windows: wintun does iocp | Jason A. Donenfeld | 2019-03-18 | 1 | -7/+0 |
| | |||||
* | wintun: Poll more often | Jason A. Donenfeld | 2019-03-10 | 1 | -1/+1 |
| | |||||
* | wintun: Make errors more descriptive | Simon Rozman | 2019-03-08 | 1 | -15/+20 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | wintun: Return correct reboot-req flag on CreateInterface() error too | Simon Rozman | 2019-03-08 | 1 | -1/+1 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | wintun: Fix double-quoted strings escaping on output | Simon Rozman | 2019-03-08 | 1 | -3/+3 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | wintun: Introduce SetupAPI enumerator and machineName consts | Simon Rozman | 2019-03-08 | 1 | -4/+7 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | wintun: Cleanup | Simon Rozman | 2019-03-07 | 1 | -1/+1 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | wintun: Refactor network registry key name generation | Simon Rozman | 2019-03-07 | 1 | -22/+18 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | wintun: Revise interface creation wait | Simon Rozman | 2019-03-07 | 1 | -59/+72 |
| | | | | | | | | | | | | | | | | | | | | DIF_INSTALLDEVICE returns almost immediately, while the device installation continues in the background. It might take a while, before all registry keys and values are populated. Previously, wireguard-go waited for HKLM\SYSTEM\CurrentControlSet\ Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\<id> registry key only. Followed by a SetInterfaceName() method of Wintun struct which tried to access HKLM\SYSTEM\CurrentControlSet\Control\Network\ {4D36E972-E325-11CE-BFC1-08002BE10318}\<id>\Connection registry key might not be available yet. This commit loops until both registry keys are available before returning from CreateInterface() function. Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | wintun: Resolve some of golint warnings | Simon Rozman | 2019-03-04 | 1 | -11/+20 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | Simplify reading NetCfgInstanceId from registry | Simon Rozman | 2019-03-04 | 1 | -8/+2 |
| | | | | | | | | As querying non-existing registry value and reading non-existing registry string value both return ERROR_FILE_NOT_FOUND, we can use later only. Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | Unify interface-specific network registry key open | Simon Rozman | 2019-03-04 | 1 | -10/+19 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | Change package path | Jason A. Donenfeld | 2019-02-18 | 1 | -2/+2 |
| | |||||
* | setupapi: Rename SP_REMOVEDEVICE_PARAMS to RemoveDeviceParams | Simon Rozman | 2019-02-07 | 1 | -2/+2 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | setupapi: Rename SP_CLASSINSTALL_HEADER to ClassInstallHeader | Simon Rozman | 2019-02-07 | 1 | -10/+4 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | setupapi: Rename SP_DEVINFO_DATA to DevInfoData | Simon Rozman | 2019-02-07 | 1 | -2/+2 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | wintun: Detect if a foreign interface with the same name exists | Simon Rozman | 2019-02-07 | 1 | -3/+36 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | wintun: Clean excessive setupapi.DevInfo.GetDeviceInfoListDetail() call | Simon Rozman | 2019-02-07 | 1 | -14/+0 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | wintun: Explain rationale behind case-insensitive interface names | Simon Rozman | 2019-02-07 | 1 | -1/+5 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | wintun: add FlushInterface stub | Jason A. Donenfeld | 2019-02-07 | 1 | -4/+13 |
| | |||||
* | wintun: Compare values of GUID, not pointers, when removing | Jason A. Donenfeld | 2019-02-07 | 1 | -1/+1 |
| | |||||
* | wintun: Introduce new package for obscuring Windows bits | Jason A. Donenfeld | 2019-02-07 | 1 | -0/+461 |