diff options
Diffstat (limited to 'main/openvpn/src/openvpn/mroute.c')
-rw-r--r-- | main/openvpn/src/openvpn/mroute.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/main/openvpn/src/openvpn/mroute.c b/main/openvpn/src/openvpn/mroute.c index ba4ef46f..972f1dd5 100644 --- a/main/openvpn/src/openvpn/mroute.c +++ b/main/openvpn/src/openvpn/mroute.c @@ -426,8 +426,16 @@ mroute_addr_print_ex (const struct mroute_addr *ma, break; case MR_ADDR_IPV6: { - buf_printf (&out, "%s", - print_in6_addr( *(struct in6_addr*)&maddr.addr, 0, gc)); + if ( IN6_IS_ADDR_V4MAPPED( (struct in6_addr*)&maddr.addr ) ) + { + buf_printf (&out, "%s", + print_in_addr_t( *(in_addr_t*)(&maddr.addr[12]), IA_NET_ORDER, gc)); + } + else + { + buf_printf (&out, "%s", + print_in6_addr( *(struct in6_addr*)&maddr.addr, 0, gc)); + } if (maddr.type & MR_WITH_NETBITS) { buf_printf (&out, "/%d", maddr.netbits); |