Commit Graph

7207 Commits

Author SHA1 Message Date
Jirka Klimes
dccdf5e1f3 core: preserve wifi and networking enabled/disabled states (bgo #582447)
With modifications by dcbw to create the state file if it doesn't exist,
and a couple cleanups and formatting fixes.
2009-11-02 17:29:53 -08:00
Alexander Sack
82011dff04 ppp: allow update of ppp secrets in all ACTIVATING stages (lp:432205)
Previously, ppp code would flip device state to _NEED_AUTH before
asking for secrets update; this is not the case anymore after landing
of f28a0df4a66e8f6c98327691c9c90df0604bbd28; hence, we need to
allow update of secrets in all ACTIVATING stages.

This patch updates this behaviour for all device classes with ppp
support.
2009-10-30 19:58:30 +01:00
Dan Williams
06a40dcf73 core: move helper macro for activating state to general location 2009-10-30 11:39:19 -07:00
Dan Williams
294a5e3153 modem: substitute known-good nameservers if PPP doesn't return any (lp:434477)
Modem firmware PPP implementations suck.
2009-10-23 16:49:38 -07:00
Dan Williams
f8643cc072 system-settings: fix PK Authority object lifetimes
It's a singleton, but PolicyKit didn't increment the reference count
when returning from polkit_authority_get() like we expected (which has
since been fixed upstream).  So for now, just don't unref the authority
at all.

Since we don't do that, there's a chance that some PolicyKit calls could
be outstanding when either the NMSysconfigSettings object or one of the
NMSysconfigConnection objects are around, so we make sure we cancel any
PolicyKit calls when the object gets disposed.  This is tricky, because
canceling them from the dispose may mean that the callback gets called
after the object is actually destroyed, so we have to be careful not to
access any private object data from the callbacks in that situation.
2009-10-21 14:23:24 -07:00
Dan Williams
4b2c810b1b core: clear invalid tag on failed connections when sleeping
So they'll get tried again on wakeup/resume.
2009-10-20 15:25:04 -07:00
Dan Williams
5761e328b8 dns: honor resolv.conf symlinks (lp:324233)
Based on a patch from Alexander Sack, but hugely
modified by me to make use of allocated realpath results
instead of stack-based arrays, and to fix an omission in
the original patch that would still have used the
non-realpath-resolved path to /etc/resolv.conf when doing
the atomic rename of the tempfile to resolv.conf.
2009-10-20 15:03:12 -07:00
Dan Williams
2d9ecfccd8 Merge commit 'origin/master' into btdun 2009-10-20 12:12:08 -07:00
Dan Williams
4b73cf2421 ipv6: fix incorrect address config signal emission
device->want_signal was never set to TRUE when addrconf was started,
causing random netlink events (say for link-local address addition
or removal) to trigger the config-changed signal from
nm_ip6_device_sync_from_netlink() at the wrong time.  This would
cause IPv6 address configuration to look like it succeeded, when
in fact the config timeout was still in-force.  Thus device
activation would proceed if IPv4 was enabled, but a few seconds later
the device would be deactivated due to the still active IPv6
timeout.

So fix that and clarify when the events from the IPv6 manager happen,
and what the want_signal variable is really for.
2009-10-20 11:23:10 -07:00
Dan Williams
23fec8dc72 ip6: save the accept_ra value and re-set it when the device is deactivated 2009-10-19 15:38:21 -07:00
Dan Williams
442dc676ef ip6: use device's IP interface, not its physical interface 2009-10-19 14:05:36 -07:00
Dan Williams
8d65515435 manager: automatically pick a base connection for VPNs
If let callers pass "/" for the specific object, and NM will
automatically pick the default device.
2009-10-16 11:52:27 -07:00
Dan Williams
7f63b48854 system-settings: fix writing connections when an earlier plugin can't (bgo #581758)
The error object passed to the plugin's add-connection handler wasn't
getting properly cleared if an earlier plugin had failed to write
the connection and fell back to the current plugin.
2009-10-15 20:52:00 -07:00
Dan Williams
bc653d2225 vpn: clear secrets when the connection fails
NM previously only cleared secrets when the VPN service daemon quit,
and the service daemons are on a 10-second inactivity timer.  So if
the user tried to re-activate the failed VPN connection within 10
seconds the old secrets would get used, which clearly isn't what we
want.  Ensure that whenever the VPN connection fails or disconnects,
we ask the settings service for secrets again the next time.
2009-10-08 23:00:01 -07:00
Dan Williams
093b86a8c7 Merge commit 'origin/master' into btdun 2009-10-07 12:21:20 -07:00
Dan Williams
6f502e9116 Merge commit 'origin/master' into btdun 2009-10-07 12:20:47 -07:00
Dan Williams
00f945e54e gsm: correct GSM band implementation and settings
NM didn't pass it to MM anyway, so it was mainly unused, but the band settings
were still wrong.  Fix that (and still preserve ABI) by adding a new property
for allowed bands that can actually hold all the bands instead of limiting
to 16-bits.  Clean up some of the deprecation stuff at the same time to make
it clearer what's deprecated and what to do about it.
2009-10-07 12:18:57 -07:00
Noel J. Bergman
59d89050f2 sharing: fix sharing after 715ddd2045 (lp:444756)
Commit 715ddd2045 broke sharing because
sometimes a multi-argument string gets passed in rule->rule.  Revert
most of that commit.  A bunch of cleanups by dcbw too.
2009-10-06 16:46:46 -07:00
Dan Williams
72a98c5b29 system-settings: fix crash saving default wired connections to backing storage (lp:430781)
Fix up refcounting, plus it turns out that we already have the MAC address
lying around as	a GObject data item, so	we don't need to go grab it
from the connection itself.
2009-10-05 17:46:16 -07:00
Dan Williams
1d28ad1aa5 ppp: add minimal debugging output to the ppp plugin 2009-10-05 12:23:03 -07:00
Frej Soya
e3ae3efc09 wired: fix build_supplicant_config for wired - bgo:594038 lp:422597 2009-10-05 11:22:20 +02:00
Dan Williams
bc81b998a9 build: fix generation of CDMA & GSM dbus interface data 2009-10-05 00:51:29 -07:00
Dan Williams
55bb7a85fd modem: re-implement GSM device on top of generic modem code
Serial interface D-Bus info has to be somewhere neutral.

Fix a CDMA secrets bug.
2009-10-05 00:42:53 -07:00
Dan Williams
9fb584242c modem: kill active connections on shutdown 2009-10-05 00:13:01 -07:00
Dan Williams
8822f75652 cdma: fix device dispose
Move modem destruction from dispose -> finalize, because the superclass
still needs to use the device at dispose time.
2009-10-05 00:05:09 -07:00
Dan Williams
ac739e3311 manager: fix up composite modem device detection and suppression
Some modems have their ethernet	interface show up only on connect,
and we want NM to ignore the ethernet interface as a top-level
device.
2009-10-04 23:59:20 -07:00
Dan Williams
66fbf31a19 modem: fix stage3 IP config kickoff 2009-10-04 23:57:51 -07:00
Dan Williams
821bfe5257 Merge commit 'origin/master' into btdun 2009-10-04 23:39:16 -07:00
Dan Williams
85da54edd7 manager: fix use-after-free crash for cdc-ether modems
An ethernet device that's actually a component of a modem could get
added to the device list, but then destroyed without getting removed
from the device list.
2009-10-04 23:36:06 -07:00
Dan Williams
e4e9d40998 modem: re-implement CDMA device on top of generic modem code 2009-10-04 23:35:20 -07:00
Dan Williams
c5cf3b1d9b modem: generalize GSM and CDMA modem classes
So that Bluetooth can use them.  They used to be NMDevice subclasses, but
we need them to be generic objects that both bluetooth and the normal
modem stack can use.  All because GObject can't do multiple inheritance,
but that would probably be even messier.

So now that we have generic modem objects, we can create the actual
NMDevice subclasses that will wrap them for non-BT modems, and then
also have NMDeviceBt wrap them too for DUN.
2009-10-04 21:41:49 -07:00
Tambet Ingo
715ddd2045 core: Make iptables path configurable
On some systems, it's located in different path...
2009-10-01 14:31:09 +03:00
Dan Williams
963d055abf wired: defer carrier-off events while connected by a few seconds
Don't immediately tear down an active wired connection when the carrier
flips to off, but wait a few seconds for it to come back before breaking
the user's network.
2009-09-28 14:12:09 -07:00
Dan Williams
a2c1256215 wired: link_timeout_id -> supplicant_timeout_id 2009-09-28 12:57:18 -07:00
Dan Williams
0bbf8c5307 ethernet: make initial carrier check synchronous; require carrier for connection takeover (lp#417719) 2009-09-28 11:09:31 -07:00
Dan Williams
ddce707d67 netlink: add blocking function to get carrier state 2009-09-28 10:50:22 -07:00
Dan Williams
aa7bb93968 core: spacing fix 2009-09-28 10:49:55 -07:00
Dan Williams
cde6af87a8 Merge commit 'origin/master' into cert-paths 2009-09-19 07:01:49 -07:00
Dan Williams
e4ed9764b5 libnm-util: deprecate GSM PUK property
Unused anyway, and PUK is dangerous enough that it should be handled
by the client explicitly and not by NM.
2009-09-18 17:08:30 -07:00
Dan Williams
c134460c9f Merge commit 'origin/master' into cert-paths 2009-09-18 09:09:03 -07:00
Dan Williams
99fb844657 core: device disconnection cleanups
Return an error when trying to disconnect an already-disconnected
or deactivated device.
2009-09-18 09:05:11 -07:00
Alexander Sack
2be94b44c3 core: implement manual disconnect feature
In the past networkmanager did not allow to manually disconnect devices.

Manually disconnected devices will not be automatically reconnected until one
of the following events occur:
 1. user activates a connection for the currently disconnected device
 2. network manager awakes from hibernate/suspend
 3. network manager is restarted (e.g. reboot)

Add a Disconnect method to generic NMDevice dbus interface; set a new private
autoconnect_inhibit flag if Disconnect method is called through dbus.
Based on this auto activation for devices gets inhibited until one
of the above events occur.
2009-09-18 17:06:48 +02:00
Dan Williams
9b7d537b65 Merge commit 'origin/master' into cert-paths 2009-09-17 11:24:56 -07:00
Dan Williams
3ce6b68c64 vpn: fix crash caused by 8d205212dc
Typo; should have been 'unref'.
2009-09-17 11:23:44 -07:00
Dan Williams
99e5a86394 system-settings: handle byte-array secrets too 2009-09-17 10:38:54 -07:00
Dan Williams
4e9f388376 Merge commit 'origin/master' into cert-paths 2009-09-14 13:38:19 -07:00
Dan Williams
7a2e2cfda3 core: rename nm_device_can_activate -> nm_device_is_available
Becuase when the device is in >= DISCONNECTED state, that already
means it can activate if a connection is available.
2009-09-14 13:33:06 -07:00
Dan Williams
393bdd3737 core: generalize unavailable -> disconnected delayed transition
Instead of doing this in every device subclass, do it in the NMDevice
superclass.  nm_device_can_activate() already did the same logic that
each of the subclass device_state_changed() handlers were doing to
figure out whether they could do the transition from unavailable
to disconnected, so just use that in NMDevice and kill lots of code.
2009-09-14 13:24:29 -07:00
Dan Williams
f01c565230 build: remove nm-gsm-device.c
No idea why this is still around; it's a left-over from 0.7.x and
replaced by src/modem-manager/nm-modem-gsm.c.
2009-09-14 13:22:46 -07:00
Dan Williams
0be66daa9a wired: get rid of nm_device_ethernet_get_carrier
Only used internally; just use priv->carrier instead
2009-09-14 12:54:09 -07:00