2008-01-21 Dan Williams <dcbw@redhat.com>
* src/ppp-manager/nm-ppp-manager.c - (ip4_config_get): set peer address too * src/ppp-manager/nm-pppd-plugin.c - (nm_ip_up): try harder to get the peer's address * src/NetworkManagerSystem.c - (nm_system_device_set_from_ip4_config): if the IP4Config has a peer address, use that too. Otherwise, some PPP connections won't work. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3260 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
12
ChangeLog
12
ChangeLog
@@ -1,3 +1,15 @@
|
||||
2008-01-21 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* src/ppp-manager/nm-ppp-manager.c
|
||||
- (ip4_config_get): set peer address too
|
||||
|
||||
* src/ppp-manager/nm-pppd-plugin.c
|
||||
- (nm_ip_up): try harder to get the peer's address
|
||||
|
||||
* src/NetworkManagerSystem.c
|
||||
- (nm_system_device_set_from_ip4_config): if the IP4Config has a peer
|
||||
address, use that too. Otherwise, some PPP connections won't work.
|
||||
|
||||
2008-01-19 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* src/NetworkManagerPolicy.c
|
||||
|
@@ -195,6 +195,7 @@ nm_system_device_set_from_ip4_config (const char *iface,
|
||||
struct rtnl_addr * addr = NULL;
|
||||
int err;
|
||||
int len, i;
|
||||
guint32 flags;
|
||||
|
||||
g_return_val_if_fail (iface != NULL, FALSE);
|
||||
g_return_val_if_fail (config != NULL, FALSE);
|
||||
@@ -208,7 +209,11 @@ nm_system_device_set_from_ip4_config (const char *iface,
|
||||
nm_system_device_flush_routes_with_iface (iface);
|
||||
nm_system_flush_arp_cache ();
|
||||
|
||||
if ((addr = nm_ip4_config_to_rtnl_addr (config, NM_RTNL_ADDR_DEFAULT))) {
|
||||
flags = NM_RTNL_ADDR_DEFAULT;
|
||||
if (nm_ip4_config_get_ptp_address (config))
|
||||
flags |= NM_RTNL_ADDR_PTP_ADDR;
|
||||
|
||||
if ((addr = nm_ip4_config_to_rtnl_addr (config, flags))) {
|
||||
rtnl_addr_set_ifindex (addr, nm_netlink_iface_to_index (iface));
|
||||
|
||||
if ((err = rtnl_addr_add (nlh, addr, 0)) < 0)
|
||||
|
@@ -314,8 +314,10 @@ ip4_config_get (DBusGProxy *proxy,
|
||||
config = nm_ip4_config_new ();
|
||||
|
||||
val = (GValue *) g_hash_table_lookup (config_hash, NM_PPP_IP4_CONFIG_GATEWAY);
|
||||
if (val)
|
||||
if (val) {
|
||||
nm_ip4_config_set_gateway (config, g_value_get_uint (val));
|
||||
nm_ip4_config_set_ptp_address (config, g_value_get_uint (val));
|
||||
}
|
||||
|
||||
val = (GValue *) g_hash_table_lookup (config_hash, NM_PPP_IP4_CONFIG_ADDRESS);
|
||||
if (val)
|
||||
|
@@ -239,6 +239,7 @@ nm_ip_up (void *data, int arg)
|
||||
{
|
||||
NMPppdPlugin *plugin = NM_PPPD_PLUGIN (data);
|
||||
ipcp_options opts = ipcp_gotoptions[ifunit];
|
||||
ipcp_options peer_opts = ipcp_hisoptions[ifunit];
|
||||
GHashTable *hash;
|
||||
GArray *array;
|
||||
GValue *val;
|
||||
@@ -253,10 +254,18 @@ nm_ip_up (void *data, int arg)
|
||||
|
||||
g_hash_table_insert (hash, NM_PPP_IP4_CONFIG_INTERFACE,
|
||||
str_to_gvalue (ifname));
|
||||
|
||||
g_hash_table_insert (hash, NM_PPP_IP4_CONFIG_ADDRESS,
|
||||
uint_to_gvalue (opts.ouraddr));
|
||||
g_hash_table_insert (hash, NM_PPP_IP4_CONFIG_GATEWAY,
|
||||
uint_to_gvalue (opts.hisaddr));
|
||||
|
||||
if (opts.hisaddr) {
|
||||
g_hash_table_insert (hash, NM_PPP_IP4_CONFIG_GATEWAY,
|
||||
uint_to_gvalue (opts.hisaddr));
|
||||
} else if (peer_opts.hisaddr) {
|
||||
g_hash_table_insert (hash, NM_PPP_IP4_CONFIG_GATEWAY,
|
||||
uint_to_gvalue (peer_opts.hisaddr));
|
||||
}
|
||||
|
||||
g_hash_table_insert (hash, NM_PPP_IP4_CONFIG_NETMASK,
|
||||
uint_to_gvalue (0xFFFFFFFF));
|
||||
|
||||
|
Reference in New Issue
Block a user