Which really shouldn't happen. But it is a useful information for
troubleshooting.
Signed-off-by: Simon Rozman <simon@rozman.si>
import (
"errors"
"fmt"
+ "log"
"os"
"sync/atomic"
"time"
return nil, fmt.Errorf("Error deleting already existing interface: %w", err)
}
}
- wt, _, err = WintunPool.CreateAdapter(ifname, requestedGUID)
+ wt, rebootRequired, err := WintunPool.CreateAdapter(ifname, requestedGUID)
if err != nil {
return nil, fmt.Errorf("Error creating interface: %w", err)
}
+ if rebootRequired {
+ log.Println("Windows indicated a reboot is required.")
+ }
forcedMTU := 1420
if mtu > 0 {