Bubble up the error in attempting to delete the interface after attempting to set the interface name has failed.
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 2/2 Bubble up the error in attempting to delete the interface after attempting to set the interface name has failed.
From: Christopher O'Connell <[email protected]>
--- tun/tun_windows.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
tun/tun_windows.go +4 -1
@@ -79,7 +79,10 @@ func CreateTUN(ifname string) (TUNDevice, error) { err = wt.SetInterfaceName(ifname) if err != nil { - wt.DeleteInterface(0) + _, _, err2 := wt.DeleteInterface(0) + if err2 != nil { + return nil,fmt.Errorf("Unable to delete Wintun interface after failing to set name: %v: %v", err2, err) + } return nil, fmt.Errorf("Unable to set name of Wintun interface: %v", err) }
Signature · 6 lines
2.21.0.windows.1 _______________________________________________ WireGuard mailing list [email protected] https://lists.zx2c4.com/mailman/listinfo/wireguard
Thanks, I'll apply this. But can you resubmit with a proper signed-off-by line (git commit -s) and a commit message that meets the format of all the other ones touching that file?
Jason
_______________________________________________
WireGuard mailing list
[email protected]
https://lists.zx2c4.com/mailman/listinfo/wireguard