After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 648382 - environment variables in dispatcher for VPN not correct
environment variables in dispatcher for VPN not correct
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: API
0.8.x
Other Linux
: Normal major
: ---
Assigned To: Dan Williams
Dan Williams
: 638909 (view as bug list)
Depends on:
Blocks: 648692
 
 
Reported: 2011-04-21 14:59 UTC by Brian J. Murrell
Modified: 2011-05-03 03:58 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Brian J. Murrell 2011-04-21 14:59:46 UTC
This might be related to 638909 but I think it's a more general problem to VPN and the dispatcher than to any particular VPN implementation.

The issue is basically that a dispatcher script for a VPN connection (i.e. in /etc/NetworkManager/dispatcher.d/) is given an environment such as:

CONNECTION_UUID='266b51c6-948f-48df-9e44-b6e42a1d6c60'
DHCP4_BROADCAST_ADDRESS='10.75.23.255'
DHCP4_DHCP_LEASE_TIME='3600'
DHCP4_DHCP_MESSAGE_TYPE='5'
DHCP4_DHCP_REBINDING_TIME='3150'
DHCP4_DHCP_RENEWAL_TIME='1800'
DHCP4_DHCP_SERVER_IDENTIFIER='10.75.23.254'
DHCP4_DOMAIN_NAME='ilinx'
DHCP4_DOMAIN_NAME_SERVERS='10.75.23.254'
DHCP4_DOMAIN_SEARCH='ilinx.'
DHCP4_EXPIRY='1303398164'
DHCP4_HOST_NAME='brian-laptop'
DHCP4_IP_ADDRESS='10.75.23.193'
DHCP4_NETWORK_NUMBER='10.75.23.0'
DHCP4_NTP_SERVERS='66.96.30.91 72.1.194.82 216.234.161.11 209.139.208.96 24.215.0.24'
DHCP4_ROUTERS='10.75.23.254'
DHCP4_SUBNET_MASK='255.255.255.0'
IFS=' 	
'
IP4_ADDRESS_0='10.75.23.193/24 10.75.23.254'
IP4_DOMAINS='ilinx'
IP4_NAMESERVERS='10.75.23.254'
IP4_NUM_ADDRESSES='1'
IP4_NUM_ROUTES='0'
OPTIND='1'
PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
PPID='6564'
PS1='# '
PS2='> '
PS4='+ '
PWD='/'

The problem is that those values are for the physical interface not for the VPN interface.  In the above, at minimum, IP4_ADDRESS_0 should be the address of the VPN interface, IP4_DOMAINS should be the domains assigned by the VPN server or entered into the NM configuration for the VPN if applicable, and IP4_NAMESERVERS should be the nameservers assigned by the VPN server, or again, entered by the user in the NM settings for the VPN.

Giving out the physical interfaces values for these settings is entirely incorrect.

Additionally, if any classless routing information is sent by the VPN server, or if the user has entered any routes in the IPV4 Settings->Routes... configuration, it would be nice to have those reported in the dispatcher environment.
Comment 1 Dan Williams 2011-04-26 20:27:07 UTC
*** Bug 638909 has been marked as a duplicate of this bug. ***
Comment 2 Dan Williams 2011-05-03 03:58:07 UTC
VPN details should now be dumped into the environment, prefixed with VPN_, like

VPN_IP4_ADDRESS_0=xxxxxxx
VPN_IP4_NAMESERVERS=x.x.x.x

etc.  IPv6 details are also now pushed in the environment.

f898dbf1a9cb657c3970fc9044d99dc46455f690