Opened 6 years ago

Closed 6 years ago

#1003 closed Bug / Defect (fixed)

Deleting ipv6 route with netsh fails

Reported by: Selva Nair Owned by:
Priority: major Milestone: release 2.4.5
Component: Networking Version: OpenVPN 2.4.4 (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords: ipv6, route
Cc:

Description

When openvpn is run as admin from command line or from automatic service (no iservice in use), ipv6 routes are set using netsh. On disconnect, deleting the route fails. The log shows

Sun Jan 21 13:01:48 2018 us=110364 delete_route_ipv6(aaaa:bbbb:cccc:dddd::1001/64)
Sun Jan 21 13:01:48 2018 us=110364 C:\WINDOWS\system32\netsh.exe interface ipv6 delete route aaaa:bbbb:cccc:dddd::1001/64 interface=11 fe80::8 store=active
Sun Jan 21 13:01:48 2018 us=210506 ERROR: Windows route delete ipv6 command failed: returned error code 1

The failure is due to the destination address including the host part (1001 here). At this point "netsh int ipv6 show route" shows the relevant route as

Publish  Type      Met     Prefix                   Idx  Gateway
----------------------------------------------------------------
No       System    256  aaaa:bbbb:cccc:dddd::/112   11  fe80::8
etc..

Manually deleting the route with the network address works.

I did not do a thorough debug, but see host bits cleared from the address in route.c, not sure why the host part is still there.

Change History (1)

comment:1 Changed 6 years ago by Gert Döring

Resolution: fixed
Status: newclosed

commit 2cea72005cb5a825c25494959d550ae16562676a (master)
commit b8f56fadbe459423b673886c785b7ed6f3a37c36 (release/2.4)
Author: Gert Doering
Date: Tue Feb 20 17:00:16 2018 +0100

Fix removal of on-link prefix on windows with netsh

Note: See TracTickets for help on using tickets.