mirror of
https://github.com/fumiama/water.git
synced 2026-06-05 02:00:29 +08:00
fix cid err
This commit is contained in:
@@ -28,7 +28,6 @@ type PlatformSpecificParams struct {
|
||||
|
||||
func defaultPlatformSpecificParams() PlatformSpecificParams {
|
||||
return PlatformSpecificParams{
|
||||
ComponentID: "root\\tap0901",
|
||||
Network: "192.168.1.10/24",
|
||||
Network: "192.168.234.0/24",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,6 +214,9 @@ func setStatus(fd syscall.Handle, status bool) error {
|
||||
}
|
||||
|
||||
func openTap(config Config) (ifce *Interface, err error) {
|
||||
if config.ComponentID == "" {
|
||||
config.ComponentID = "root\\tap0901"
|
||||
}
|
||||
// find the device in registry.
|
||||
deviceid, err := getdeviceid(config.PlatformSpecificParams.ComponentID, config.PlatformSpecificParams.InterfaceName)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user