Re: [PATCH 1/1] vpnc: add support to change interface name

On Tue, 2014-09-23 at 10:58 +0200, Christian Hesse wrote:
Dan Williams <dcbw redhat com> on Mon, 2014/09/22 10:09:
On Mon, 2014-09-22 at 10:02 +0200, Christian Hesse wrote:
By default interface name is 'tun' with an incrementing number (tun0,
tun1, ...). By specifying 'Interface name' in vpnc config you can change
the name to something more descriptice.

So this is great, and ties in with some other stuff we're doing.
However, one change I'd like to request.  Instead of putting the
interface name into the VPN data (like the other vpnc-specific options),
lets put it into the NMSettingConnection setting's 'interface-name'

Sounds reasonable.

But (NMConnection *connection) is specific to a VPN connection and does not
have an interface-name property, no? If I got it right I can not pass it to
nm_connection_get_setting_connection() and therefore (NMSettingConnection
*s_con) is missing. So do we have to create (NMConnection *connection) and
(NMConnection *vpn) and pass around both?

Hi Christian,

A NMConnection is (basically) a bunch of NMSetting instances.
NMSetting is (basically) a typed Key-Value-Dictionary.
Therefore, NMConnection is a bunch of Key-Value-Dictionaries.

Any valid NMConnection must have at least an NMSettingConnection
instance. NMConnection has no interface-name property, but
NMSettingConnection has.

Look again at the example code from dcbws email.
nm_connection_get_setting_connection() has signature:
  nm_connection_get_setting_connection(NMConnection *connection)
... the example looks correct to me.


Attachment: signature.asc
Description: This is a digitally signed message part

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]