diff options
author | Dan Williams <dcbw@redhat.com> | 2008-10-10 23:05:45 +0000 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2008-10-10 23:05:45 +0000 |
commit | ad7a46d8676bd01b8294900ef1aaebcaa92a9015 (patch) | |
tree | 0e98beabad163749eb8f0a4e567960e64a44b43c /src/vpn-manager/nm-vpn-connection.h | |
parent | 9b82c1e92f5c1a03238d57069f66bddcdfdfc81d (diff) | |
download | NetworkManager-ad7a46d8676bd01b8294900ef1aaebcaa92a9015.tar.gz |
2008-10-10 Dan Williams <dcbw@redhat.com>
Rework default route handling to consolidate decisions in the policy,
and to take active VPN connections into account when changing the default
route (bgo #545912)
* src/NetworkManager.c
- (main): pass the vpn_manager to the policy so it knows about active
VPN connections; clean up the named manager which wasn't done before
* src/NetworkManagerPolicy.c
src/NetworkManagerPolicy.h
- (nm_policy_new): get a clue about the vpn_manager
- (update_default_route): remove, fold into update_routing_and_dns()
- (update_routing_and_dns): handle active VPN connections too; an
active VPN connection becomes the default route if it does not have
server-specified or user-specified custom routes. Otherwise, the
best active device gets the default route
- (vpn_connection_activated, vpn_connection_deactivated, nm_policy_new,
nm_policy_destroy): track VPN connection activation and deactivation
and update the default route when appropriate
* src/NetworkManagerSystem.c
src/NetworkManagerSystem.h
- (nm_system_vpn_device_unset_from_ip4_config): remove, put functionality
in the VPN connection itself
- (nm_system_vpn_device_set_from_ip4_config,
nm_system_device_set_from_ip4_config): merge together to make
nm_system_apply_ip4_config()
- (add_vpn_gateway_route): add a route to the VPN's external gateway
via the parent device
- (nm_system_apply_ip4_config): simplify
- (add_ip4_route_to_gateway): new function; add a direct route to the
gateway if needed
- (nm_system_device_replace_default_ip4_route): simplify, break gateway
route stuff out into add_ip4_route_to_gateway() for clarity
* src/nm-device.c
- (nm_device_set_ip4_config): update for nm_system_apply_ip4_config()
* src/vpn-manager/nm-vpn-connection.c
src/vpn-manager/nm-vpn-connection.h
- (nm_vpn_connection_get_ip4_config, nm_vpn_connection_get_ip_iface,
nm_vpn_connection_get_parent_device): add
- (nm_vpn_connection_ip4_config_get): make the requirement of a tunnel
device explicit
- (connection_state_changed): update the named manager now that
nm_system_vpn_device_unset_from_ip4_config() is gone; do something
useful on errors
* src/vpn-manager/nm-vpn-manager.c
src/vpn-manager/nm-vpn-manager.h
- Add a 'connection-activated' signal
- (nm_vpn_manager_get_active_connections): new function; mainly for the
policy to find out about active VPN connections
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4167 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Diffstat (limited to 'src/vpn-manager/nm-vpn-connection.h')
-rw-r--r-- | src/vpn-manager/nm-vpn-connection.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vpn-manager/nm-vpn-connection.h b/src/vpn-manager/nm-vpn-connection.h index b642023733..7007b0bbc5 100644 --- a/src/vpn-manager/nm-vpn-connection.h +++ b/src/vpn-manager/nm-vpn-connection.h @@ -70,5 +70,8 @@ void nm_vpn_connection_fail (NMVPNConnection *connect NMVPNConnectionStateReason reason); void nm_vpn_connection_disconnect (NMVPNConnection *connection, NMVPNConnectionStateReason reason); +NMIP4Config * nm_vpn_connection_get_ip4_config (NMVPNConnection *connection); +const char * nm_vpn_connection_get_ip_iface (NMVPNConnection *connection); +NMDevice * nm_vpn_connection_get_parent_device (NMVPNConnection *connection); #endif /* NM_VPN_CONNECTION_H */ |