Opened 8 years ago

Closed 4 years ago

#734 closed Bug / Defect (fixed)

netbsd 7.0.1 / i386: show-gateway for IPv6 broken

Reported by: Gert Döring Owned by: Gert Döring
Priority: major Milestone: release 2.4
Component: IPv6 Version: OpenVPN git master branch (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords:
Cc:

Description

nbsd70$ SU src/openvpn/openvpn --show-gateway
Tue Sep 13 16:55:11 2016 GDG6: problem writing to routing socket
Tue Sep 13 16:55:11 2016 ROUTE_GATEWAY 194.97.140.30

Change History (4)

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

So, re-testing with 9.0 amd64/i386 in vagrant

NetBSD 64 / amd64 works:

netbsd-9$ src/openvpn/openvpn --show-gateway 
2020-09-13 11:36:09 ROUTE_GATEWAY 10.0.2.2/255.255.255.0 IFACE=wm0 HWADDR=08:00:27:a0:47:f1
2020-09-13 11:36:09 ROUTE6_GATEWAY fe80::1 IFACE=wm1

(NOTE: if there is no IPv6 gateway, it will report the "problem writing to routing socket" as well - so the message could certainly improved)

NetBSD 9.0 / i386 never works:

netbsd-9i$ sudo route add -inet6 ::/0 fe80::1%wm1
add net ::/0: gateway fe80::1%wm1
netbsd-9i$ src/openvpn/openvpn --show-gateway
2020-09-13 11:55:46 GDG6: problem writing to routing socket
2020-09-13 11:55:46 ROUTE_GATEWAY 10.0.2.2
netbsd-9i$ src/openvpn/openvpn --show-gateway ::1
2020-09-13 11:55:50 GDG6: problem writing to routing socket
2020-09-13 11:55:50 ROUTE_GATEWAY 10.0.2.2

"route get -inet6 ::" works, though

   route to: ::
destination: ::
       mask: default
    gateway: fe80::1%wm1
 local addr: fe80::73d3:268b:db02:3445%wm1
  interface: wm1

so this is something on our code. Possibly 32/64 bit ABI/API mismatch (like MacOS).

Last edited 4 years ago by Gert Döring (previous) (diff)

comment:2 Changed 4 years ago by Gert Döring

Yah. "long" vs. "uint64_t"... so happened to work on amd64 (sizeof(long)=8), stopped working on i386 when this was increased. Use RT_ROUNDUP() from <net/route.h>

comment:4 Changed 4 years ago by Gert Döring

Resolution: fixed
Status: newclosed

commit 37aab49b083a9e385970e3ab2dd727ea1a95ff35 (master)
commit 9a695902402faafa343783c38761c4c0ccbb2b83 (HEAD -> release/2.5)
commit 9e9fd488d7d939ac9992f8bd4c7394a39b73d7e4 (HEAD -> release/2.4)
Author: Gert Doering
Date: Sun Sep 13 16:56:21 2020 +0200

Fix --show-gateway for IPv6 on NetBSD/i386.

Note: See TracTickets for help on using tickets.