aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tunnel/winipcfg
diff options
context:
space:
mode:
Diffstat (limited to 'tunnel/winipcfg')
-rw-r--r--tunnel/winipcfg/luid.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/tunnel/winipcfg/luid.go b/tunnel/winipcfg/luid.go
index 0aae7755..ca388acc 100644
--- a/tunnel/winipcfg/luid.go
+++ b/tunnel/winipcfg/luid.go
@@ -98,6 +98,9 @@ func (luid LUID) AddIPAddress(address net.IPNet) error {
row := &MibUnicastIPAddressRow{}
row.Init()
row.InterfaceLUID = luid
+ row.DadState = DadStatePreferred
+ row.ValidLifetime = 0xffffffff
+ row.PreferredLifetime = 0xffffffff
err := row.Address.SetIP(address.IP, 0)
if err != nil {
return err
@@ -189,6 +192,8 @@ func (luid LUID) Route(destination net.IPNet, nextHop net.IP) (*MibIPforwardRow2
row := &MibIPforwardRow2{}
row.Init()
row.InterfaceLUID = luid
+ row.ValidLifetime = 0xffffffff
+ row.PreferredLifetime = 0xffffffff
err := row.DestinationPrefix.SetIPNet(destination)
if err != nil {
return nil, err