libnm: accept invalid connections in NMVpnServicePlugin
authorThomas Haller <thaller@redhat.com>
Wed, 23 Mar 2016 14:39:49 +0000 (15:39 +0100)
committerThomas Haller <thaller@redhat.com>
Sat, 26 Mar 2016 11:10:54 +0000 (12:10 +0100)
commit559ab7bd7cd886b97d23ae43b3870f71cb147d62
tree87fbb87014c00733be5c53d43fbf7372df706819
parent9a31bbcbc398568a065e0f3d48c0dfce7eddcef7
libnm: accept invalid connections in NMVpnServicePlugin

When we receive a connection from NetworkManager it is not guaranteed
that the connection verifies. For example, if the current libnm version
is older then the NetworkManager version.

Be more accepting and don't do any verification of the connection.

For NMVpnPluginOld this change is uncritical, because there are probably
no users of this API anyway.

NMVpnServicePlugin is new API since nm-1-1. However, this API is already
strongly used by all the plugins we ported over. So this change is
affecting them.
This should only matter if libnm's and NetworkManager's version differ,
because NetworkManager just doesn't send out an invalid connection. It
actually only matters if NetworkManager is a newer version and sends an
invalid connection to the client. That is anyway badly tested and probably
this changes rather improves compatibility than breaking existing users.
libnm/nm-vpn-plugin-old.c
libnm/nm-vpn-service-plugin.c