Commit Graph

7207 Commits

Author SHA1 Message Date
Dan Williams
ab167b1994 ethernet: clean up netlink monitoring code
Keep a reference to the netlink monitor for as long as we have
signals attached to it.  Also don't bother looking up the ifindex
in the carrier state signal handlers since we already have it
lying around in priv.
2009-09-14 12:15:15 -07:00
Dan Williams
25d17ef341 core: always tear down devices when their hardware goes away
Previous connection-assumption code that made sure not to touch
ethernet devices when NM quit also didn't clean up after devices
that were physically removed, which was wrong.
2009-09-14 07:55:59 -07:00
Dan Williams
db588ed8e5 vpn: don't reset VPN gateway route when parent device is going down
Or really, any time the parent IP4 config is cleared which is pretty
much only when the device is going down.  Avoids a warning when
nm_system_add_ip4_vpn_gateway_route() can't get the parent IP4Config
because it doesn't exist.
2009-09-14 07:55:59 -07:00
Dan Williams
8d205212dc vpn: fix crash when canceling VPN connection secrets request
The secrets provider might be unrefed while processing the response,
causing a double-free when the unref triggers the weak ref notifier
and clears out the GetSecretsInfo, but then later the dbus handler
that got the response in the first place tries to free the info
explicitly.  So keep the provider around while processing the result.
2009-09-10 12:18:18 -07:00
Noel J. Bergman
aced7c25c2 policy: reschedule failed devices for activation after a short delay
Instead of immediately...  devices handled externally from NM (by
ModemManager or Bluez or whatever) have a slight delay in reporting
to NM that they device has been removed (due to internal housekeeping
and then pushing the event into D-Bus signals or something) and thus
when NM notices PPP failures and tries to reschedule activation
of autoconnect=true connections, it fails the reactivation because
the device actually is no longer present, but it hasn't gotten the
device-removed event from MM or Bluez yet.  That sets the invalid
tag on the connection, and when the device gets replugged, the
invalid tag suppresses autoconnect.
2009-09-09 17:19:39 -07:00
Dan Williams
9b55936dee device: only invalidate connections if they failed during activation
Otherwise, connections used to get marked invalid on hot-unplug, which
isn't really correct.
2009-09-09 12:21:55 -07:00
Dan Williams
f28a0df4a6 ppp: ignore certain pppd status changes
We don't actually care when pppd goes into the 'network' phase or the
'authenticate' phase, because we're looking for the IP4 configuration
to come back, and the device is already in the IP_CONFIG state.
Handling those phases would cause the device's state to jump around
between NEED_AUTH and IP_CONFIG when we were already past that phase.

Specifically, when the PPP link went down, the device would jump from
FAILED to IP_CONFIG because pppd entered the 'network' phase when
cleaning up the link.  The device would also jump from IP_CONFIG to
NEED_AUTH during the connection process when we already had secrets.
2009-09-09 07:44:21 -07:00
Dan Williams
bee58e359d modem: disable modem instead of just disconnecting
Until later when we'll actually do stuff like probing signal
strength and such while disconnected.
2009-09-04 17:42:09 -05:00
Alexander Sack
2e912158af core: ensure that modem-manager claimed data devices are ignored
add function nm_modem_manager_has_modem_for_iface to modem-manager api
and ignore device additions in nm-manager if the iface is claimed by
modem-manager; also forget about already managed devices once they get
claimed by modem-manager.
2009-09-04 16:55:48 +02:00
Dan Williams
e5ed391f28 libnm-util: allow certificate/key paths
Overload the certificate and key properties to allow paths to the
certificates and keys using a special prefix for the property data.
Add API to libnm-util for easy certificate path handling, and
documentation for NMSetting8021x.
2009-09-04 09:07:00 -05:00
Dan Williams
eb96ffda5d vpn: ignore VPN-provided gateway host route (bgo #583323)
Since NM adds the gateway host route in the manner that's correct
for the current routing situation, we don't really want random
gateway host routes from the VPN server getting added instead.
2009-08-28 10:35:38 -05:00
Dan Winship
6fbd834889 Don't remove-and-then-immediately-re-add addresses
For IPv6 autoconf, the addresses returned from NMIP6Manager will
already have been added to the interface, and if we remove and readd
them it will cause additional netlink notifications which may cause us
to think additional changes have been made. So change the
config-applying code to only remove addresses that aren't part of the
new config.
2009-08-26 14:38:01 -04:00
Dan Winship
7344cc186d Add NMIP6Manager to handle IPv6 addrconf
Automatic IPv6 configuration is handled by the kernel, but to
integrate it properly with NetworkManager, we need to watch what the
kernel does to see whether or not it was successful (so that we can
let the user know if there is no IPv6 router present, for example).
NMIP6Manager takes care of this.
2009-08-26 14:37:45 -04:00
Dan Winship
67a5f31fc8 Work around libnl address caching bug
rtnl_addr requires that all addresses have the "peer" attribute set in
order to be compared for equality, but this attribute is not normally
set. As a result, most addresses will not compare as equal even to
themselves, busting caching. We fix this for now by poking into the
guts of libnl if it is broken...
2009-08-26 14:37:17 -04:00
Dan Williams
58fcc8efe6 libnm-glib: libnm_glib -> libnm-glib
Bothered me for a long time; now that we've bumped the soname, we can
rename the library too.
2009-08-26 13:07:35 -05:00
Dan Williams
5a29dfef24 Merge commit 'origin/master' into polkit1 2009-08-26 10:46:08 -05:00
Dan Winship
592769cfd9 core: add a cast to fix compile on 32-bit 2009-08-25 18:18:16 -04:00
Dan Williams
d56674b147 libnm-glib: NMSettingsSystemPermission -> NMSettingsSystemPermissions 2009-08-24 15:57:11 -05:00
Dan Williams
2dbaab2221 system-settings: add permissions
Since the new PolicyKit does away with easy checking of authorizations,
we get to implement it by ourselves, but that's OK since we can actually
use it for a lot more stuff.  So add the GetPermissions call which returns
the permissions the caller actually has, and a signal informing callers
that their permissions might have changed.  Hook this all up to
PolicyKit so it's useful.
2009-08-24 13:03:09 -05:00
Dan Williams
56a597be32 core: use defined signal names 2009-08-24 10:17:05 -05:00
Dan Williams
e2b13be3d9 Merge commit 'origin/master' into polkit1
Conflicts:
	libnm-glib/Makefile.am
	src/system-settings/nm-sysconfig-settings.c
	system-settings/plugins/ifcfg-rh/plugin.c
2009-08-21 14:12:31 -05:00
Dan Williams
09459788cd core: don't use backtrace_symbols() from a signal handler
It uses malloc(), which you can't do from a signal handler.
2009-08-21 12:16:17 -05:00
Dan Williams
20a0d197f7 core: fix log message 2009-08-21 12:12:50 -05:00
Alexander Sack
b6637b2053 core: make sure device interfaces are up before ip4 configuration 2009-08-20 21:02:17 +02:00
Tyson Whitehead
cb6039033a supplicant: add ca_path2 to verification table (bgo #592467) 2009-08-20 13:21:17 -05:00
Dan Williams
718e3bf89c build: remove unused references to HAL 2009-08-20 12:38:59 -05:00
Dan Williams
537c2f1f86 build: always link locally-built libraries first (bgo #580131) 2009-08-20 12:31:17 -05:00
Dan Williams
0fb5560b79 udev: fix ibmebus/ehea device detection (rh #511304) (rh #516591)
The driver is on the grandparent, not the parent.
2009-08-20 10:23:47 -05:00
Dan Williams
a8ca7f537d ppp: work around PPP bug that returns bogus nameservers
Work around a PPP bug (#1732) which causes many mobile broadband
providers to return 10.11.12.13 and 10.11.12.14 for the DNS servers.
Apparently fixed in ppp-2.4.5 but we've had some reports that this is
not the case.

http://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=2e09ef6886bbf00bc5a9a641110f801e372ffde6
http://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=f8191bf07df374f119a07910a79217c7618f113e
2009-08-18 12:28:56 -05:00
Dan Winship
80d48837ce ipv6: fix up no-duplicates logic in nm_ip6_config_add_nameserver 2009-08-18 11:14:55 -04:00
Dan Williams
b62702d337 modem: don't send PropertyChanged signals for private properties 2009-08-17 19:55:01 -05:00
Dan Williams
c2fb1f850a gsm/bt: fix merge of user-defined IPv4 settings 2009-08-17 19:48:42 -05:00
Dan Williams
3e221833da ppp: start PPP at activation stage3 instead of stage2
With the addition of IPv6, both v4 and v6 configuration are run in
parallel, and when both have finished, then activation can proceed.
Unfortunately, two of the 3 users of PPP (PPPoE and 3G) ran PPP at
stage2, and when the PPP IPv4 config was received, jumped directly
to activation stage4.  That caused the IPv6 code never to run, and
thus we hung at stage4 waiting for it to complete when nothing had
started it in the first place.

Instead, move PPP to stage3 so that
nm_device_activate_stage3_ip_config_start() can kick off both v4
and v6 IP code and we can successfully complete IP configuration
in all cases.  PPP previously being in stage2 was an artifact of
the more simplistic pre-IPv6 configuration code where it didn't
matter if you skipped stage3.
2009-08-17 15:35:02 -05:00
Dan Williams
377b116651 gsm: harmonize GSM network modes with ModemManager API 2009-08-17 14:43:37 -05:00
Dan Williams
a90491e8d8 gsm: reset secrets tries counter to avoid asking for secrets we don't need
The counter wasn't getting reset, so the second time the connection was
activated, secrets would be requested even though they weren't needed.
2009-08-17 14:39:22 -05:00
Alexander Sack
2e849a0cb8 system-settings: fix crasher (lp:411668) 2009-08-12 17:19:55 -05:00
Dan Williams
fb34976ab9 system-settings: remove redundant default methods for update/delete
NMExportedConnection implements these already, and we want the functionality
that it provides, so we don't need to override them here.
2009-08-12 17:10:20 -05:00
Dan Williams
d26b436d9e libnm-glib: NMSettingsInterface::add_connection() should take an NMConnection
instead of an NMSettingsConnectionInterface, because we won't always have an
object that implements NMSettingsConnectionInterface.  Plus, since NMConnection
is a prerequisite of NMSettingsConnectionInterface, the NMConnection will
always be there anyway.
2009-08-11 14:12:48 -05:00
Dan Williams
71507c9fa3 system-settings: fix issues with system settings service property types 2009-08-10 23:52:03 -05:00
Dan Williams
890866bef9 system-settings: clean up settings service classes
Make NMSettingsService implement most of the NMSettingsInterface
API to make subclasses simpler, and consolidate exporting of
NMExportedConnection subclasses in NMSettingsService instead of
in 3 places.  Make NMSysconfigSettings a subclass of
NMSettingsService and save a ton of code.
2009-08-10 23:25:11 -05:00
Dan Williams
f64354d0cc Merge commit 'origin/master' into polkit1
Conflicts:
	system-settings/plugins/ifcfg-rh/nm-ifcfg-connection.c
2009-08-10 16:27:16 -05:00
Dan Williams
38f732a721 Merge branch 'iscsi' 2009-08-10 15:52:28 -05:00
Dan Williams
869e57524c core: fix uninitialized variable usage 2009-08-06 15:15:46 -04:00
Dan Williams
78bb1c01b7 core: implement connection assumption
Mark activation requests that contain connections to be assumed,
and use that to short-circuit various parts of the activation
process by not touching various device attributes, since they
are already set up.  Also ensure the device is not deactivated
when it initially becomes managed, because that would kill the
connection we are about to assume.
2009-08-05 18:03:09 -04:00
Daniel Drake
ff88cf12c2 olpc: add mesh device logic and config setting 2009-08-05 16:34:02 -04:00
Dan Williams
4802094985 Merge commit 'origin/master' into iscsi 2009-08-05 15:46:11 -04:00
Dan Williams
e9c4a16ea3 Merge commit 'danw-ipv6/ipv6'
Conflicts:
	src/nm-manager.c
2009-08-04 14:18:05 -04:00
Dan Williams
f2eb3dea65 core: base infrastructure for connection assumption
Figure out what connections can be assumed when a device is added,
and on shutdown don't blow away connections that can be assumed on
NM restart.
2009-08-03 17:15:03 -04:00
Dan Williams
a77655df06 core: don't send properties-changed events for internal properties 2009-07-30 10:39:57 -04:00
Dan Winship
e4d03e1f9d manager: fix crash when applets exit
Due to bad refcounting of D-Bus proxies of the connections applets
expose.
2009-07-30 09:27:21 -04:00