From 2c3d35e24e695996389dc4dfee3bcc38caf6b6ea Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Tue, 11 Jun 2019 13:40:38 +0200 Subject: winipcfg: prefer own methods over direct API calls Signed-off-by: Simon Rozman --- tunnel/winipcfg/luid.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tunnel/winipcfg/luid.go b/tunnel/winipcfg/luid.go index f3cc1f43..ff7061d2 100644 --- a/tunnel/winipcfg/luid.go +++ b/tunnel/winipcfg/luid.go @@ -84,7 +84,7 @@ func (luid LUID) IPAddress(ip net.IP) (*MibUnicastIPAddressRow, error) { // (https://docs.microsoft.com/en-us/windows/desktop/api/netioapi/nf-netioapi-createunicastipaddressentry). func (luid LUID) AddIPAddress(address net.IPNet) error { row := &MibUnicastIPAddressRow{} - initializeUnicastIPAddressEntry(row) + row.Init() row.InterfaceLUID = luid err := row.Address.SetIP(address.IP, 0) if err != nil { @@ -120,7 +120,7 @@ func (luid LUID) SetIPAddresses(addresses []net.IPNet) error { // (https://docs.microsoft.com/en-us/windows/desktop/api/netioapi/nf-netioapi-deleteunicastipaddressentry). func (luid LUID) DeleteIPAddress(address net.IPNet) error { row := &MibUnicastIPAddressRow{} - initializeUnicastIPAddressEntry(row) + row.Init() row.InterfaceLUID = luid err := row.Address.SetIP(address.IP, 0) if err != nil { -- cgit v1.2.3-59-g8ed1b