Opened 8 years ago

Closed 3 weeks ago

#230 closed Feature Wish (fixed-external)

IPV6 environment variables missing for client-connect

Reported by: zoredache Owned by: Gert Döring
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 7 years ago.
patch (3.7 KB) - added by sthibault 6 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 7 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 7 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 7 years ago by kybermonty

comment:3 Changed 7 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 7 years ago by Samuli Seppänen

Milestone: release 2.4
Owner: set to Gert Döring
Status: newassigned

Cron2 can have a look at this.

comment:5 Changed 6 years ago by stipa

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

Changed 6 years ago by sthibault

Attachment: patch added

comment:6 Changed 6 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 3 years 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

comment:8 Changed 3 weeks ago by Gert Döring

Resolution: fixed-external
Status: assignedclosed

This can be closed now... after stalling for far too long, d12fk intervened and just implemented it (and it got merged many moons ago)

commit a8f8b9267183c3cfc065f344d61effe6c55c3da6
Author: Heiko Hund <heiko.hund@…>
Date: Wed Nov 25 17:46:49 2015 +0100

put virtual IPv6 addresses into env


Add missing environment variables for IPv6 virtual addresses:


  • ifconfig_pool_local_ip6
  • ifconfig_pool_remote_ip6
  • ifconfig_pool_ip6_netbits

this is in 2.3.9 and 2.4 (and 2.5, of course)

Note: See TracTickets for help on using tickets.