Opened 5 years ago

Last modified 5 months ago

#230 assigned Feature Wish

IPV6 environment variables missing for client-connect

Reported by: zoredache Owned by: cron2
Priority: major Milestone: release 2.4
Component: IPv6 Version: OpenVPN 2.3-beta / 2.3-RC (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords:
Cc:

Description

I was taking a look at the new IPv6 features of the 2.3 release.

My client-connect scripts makes use of the ifconfig_pool_local_ip, and ifconfig_pool_remote_ip to update DNS when a client connects, but there is no equivalent environment variables for IPv6 being set before the client-connect script is run.

I believe this is related to a comment in multi.c:1429, there appears to be a TODO note left by somebody asking if these should exist.

Attachments (2)

openvpn-ipv6-environment-variables.patch (2.6 KB) - added by kybermonty 4 years ago.
patch (3.7 KB) - added by sthibault 4 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 follow-up: Changed 4 years ago by Freeaqingme

What's the status of this ticket? It seems to be a really small thing for someone who knows his way around the source, and currently it's limiting our ability of implementing ipv6 support.

comment:2 in reply to: ↑ 1 Changed 4 years ago by redstar2k

Replying to Freeaqingme:

What's the status of this ticket? It seems to be a really small thing for someone who knows his way around the source, and currently it's limiting our ability of implementing ipv6 support.

Yes, we really need something like "ifconfig_ipv6_pool_remote_ip" so we can get the ipv6 IP that is sent to the client.

Changed 4 years ago by kybermonty

comment:3 Changed 4 years ago by kybermonty

Hi,
I added environment variables ifconfig_pool_local_ip6 and ifconfig_pool_remote_ip6.
Patch for version 2.3.2 is in attachment.

Martin Grames

comment:4 Changed 4 years ago by samuli

  • Milestone set to release 2.4
  • Owner set to cron2
  • Status changed from new to assigned

Cron2 can have a look at this.

comment:5 Changed 4 years ago by stipa

What is the status of this issue? It it going to be included in next release?

Changed 4 years ago by sthibault

comment:6 Changed 4 years ago by sthibault

Hello,

See the discussion starting at:

http://sourceforge.net/p/openvpn/mailman/message/30892694/

Bascically Gert was saying that the local IP is not useful (and it's indeed not in my case).

I have attached my version of the patch, which fixes quite a few shortcomings of the patch initially proposed on this ticket: you can not just test addr != 0 to check whether it's a zero address, and using memcpy between members of a union does not make sense. Also, it adds documentation for the variable.

Samuel

comment:7 Changed 5 months ago by niels

If you arrived here like I did and now intend to re-work things to use learn-address as Gert suggests in the mail conversation linked by Samuel, be aware that learn-address may not work as intended: https://community.openvpn.net/openvpn/ticket/627

Note: See TracTickets for help on using tickets.