Commit Graph

7207 Commits

Author SHA1 Message Date
Michael Biebl
8119ecf6b0 core: depend on stable gudev API 2011-03-10 03:19:27 -06:00
Dan Williams
62ad893a4a core: bring the state() D-Bus method back
It's a lot easier for app developers to use.
2011-03-08 12:57:35 -06:00
Dan Williams
5c260cfe4a keyfile: trivial whitespace fixes 2011-03-08 10:19:01 -06:00
Dan Williams
9a3d762fdf settings: fix some code that required glib 2.26
Should be compatible with at least glib 2.24 and hopefully earlier.
2011-03-08 10:18:29 -06:00
Jiří Klimeš
c207d020f7 core: use nm_connection_get_id() and nm_connection_get_uuid() to simplify code 2011-03-08 13:41:28 +01:00
Jiří Klimeš
78b1260af4 ifcfg-rh: fix testcases now that timestamps are no longer written
Timestamps are no longer written to the connection file itself, but
are kept in a lookaside file in /var to allow for read-only or
stateless /etc and to ease system administration and deployment.
2011-03-08 11:58:00 +01:00
Jiří Klimeš
2e3e171171 ifcfg-rh: get rid of LAST_CONNECT
timestamps are now kept in /var/log/NetworkManager/timestamps
2011-03-08 11:49:49 +01:00
Jiří Klimeš
83d8677963 core: timestamp handling - don't touch /etc when updating timestamps (bgo #637825)
NM updates timestamp for active connections every 5 min. We don't
want to touch files in /etc due to this. This commit solves that
by not updating timestamp in the connection's property. Rather it
updates the timestamp internally. All timestamps are also kept track
of in /var/lib/NetworkManager/timestamps file.
When settings are requested via D-Bus GetSettings(), the proper
timestamp is put in the connection setting before returning.
2011-03-08 10:37:44 +01:00
Michael Biebl
f2f406b316 ifupdown: normalize keys using - or _ (debian #609831) 2011-03-07 09:57:05 -06:00
Daniel Trebbien
96044f7d94 ifupdown: use new logging API 2011-03-05 00:02:43 -06:00
Mikhail Efremov
77eeb95233 settings: don't dereference NULL pointer on request removal 2011-03-05 00:01:01 -06:00
Dan Williams
ffb9457d55 dnsmasq: remove unused variable 2011-03-04 23:56:19 -06:00
Dan Williams
b05b77fa26 dnsmasq: send no config file instead of a bogus one (lp:725041) (debian #615082) 2011-03-04 23:52:44 -06:00
Dan Williams
5bce4adfbb ifcfg-rh: clean up temporary testcase certificates files (fixes distcheck) 2011-03-03 19:15:49 -06:00
Dan Williams
e9165c0f7d trivial: turn off debug messages in /etc/hosts testcase 2011-03-03 18:51:55 -06:00
Dan Williams
9e45d7c8cb ifcfg-rh: test writing TLS secret flags and reading them back in 2011-03-03 18:37:33 -06:00
Dan Williams
e165511ed8 ifcfg-rh: fix handling of private key password secret flags 2011-03-03 17:32:29 -06:00
Dan Williams
bc4d3482e1 ifcfg-rh: handle secret flags
Some adjustments need to be made to read and write secret flags, and
to ensure that connections that don't have system-owned secrets are
still parsed as expected.  testcases for 802.1x connections to come
shortly.
2011-03-03 12:29:37 -06:00
Dan Williams
ecca85066d keyfile: write certificates and keys in a human-readable manner
Write actual paths, not integer lists.  When given certificate or
key blobs, write those out to files and put the path to that file
into the keyfile.
2011-03-03 00:03:44 -06:00
Dan Williams
e3cddc8d9f keyfile: allow paths to be used for certificates and private keys
No reason it should have to be bare byte arrays, ick.
2011-03-02 23:44:27 -06:00
Dan Williams
c9246b53ff ifcfg-rh: fix leak writing out certificate blobs 2011-03-02 23:39:42 -06:00
Dan Williams
eae0e8de61 dhcp: don't quit if we can't find a usable DHCP client (bgo #643575) 2011-03-02 23:33:43 -06:00
Dan Williams
97053ccb8c ifcfg-rh: consolidate variable definition 2011-02-28 17:51:52 -06:00
Dan Williams
781ea63209 ifcfg-rh: clean up EAP-TLS reading 2011-02-28 17:50:32 -06:00
Dan Williams
223b87b28d ifcfg-rh: shorten variable name 2011-02-28 17:47:29 -06:00
Dan Williams
a1a5342f1d ifcfg-rh: get rid of useless EAP reader prototypes
Shuffle stuff around and we don't need these prototypes.
2011-02-28 16:07:36 -06:00
Dan Williams
677cb1aaba keyfile: fix tests for no-longer-required serial and PPP settings 2011-02-25 12:52:28 -06:00
Dan Williams
a4ab74d903 core: don't autocomplete non-IPv6-capable connections with IPv6 enabled
Mobile broadband and PPPoE don't yet support IPv6, so don't enable
IPv6 on these connections when completing them.
2011-02-25 11:58:16 -06:00
Dan Williams
bf854ebaca ip6: fail activation if addrconf fails to start
Like if the IP interface doesn't have an ifindex yet.  Previously
the connection would just go merrily along and wait for IPv6 to
complete even though it had already failed.  Happens if you try
to do IPv6 on mobile broadband connections, which we'll add support
for later.
2011-02-25 11:28:08 -06:00
Dan Williams
125540471b core: don't require serial and PPP settings for mobile broadband
If they are there, use them.  If not, make them up on the fly.
2011-02-25 11:24:20 -06:00
Dan Williams
bf34e7099d ppp: fix warning when PPP support is disabled 2011-02-25 11:03:53 -06:00
Dan Williams
2140dad5e0 core: consolidate mobile broadband device types
These days more and more devices are showing up that support a
number of different access technology families in the same hardware,
like Qualcomm Gobi (CDMA and GSM), Pantech UM190 (CDMA and GSM),
Pantech UML290 (CDMA and LTE), LG VL600 (CDMA and LTE), Sierra
320U (GSM and LTE), etc.  The previous scheme of having device
classes based on access technology family simply cannot handle
this hardware and attempting to add LTE to both the CDMA and GSM
device classes would result in a bunch of code duplication that
we don't want.  There's a better way...

Instead, combine both CDMA and GSM device classes into a generic
"Modem" device class that provides capabilities indicating what
access technology families a modem supports, and what families
it supports immediately without a firmware reload.  (Gobi devices
for example require a firmware reload before they can switch
between GSM and CDMA).  This provides the necessary flexibility
to the client and allows us to keep the API stable when the
same consolidation change is made in ModemManager.

The current code doesn't yet allow multi-mode operation internally,
but the API is now what we want it to be and won't need to be
changed.
2011-02-25 10:16:17 -06:00
Dan Williams
3b61adec74 core: consolidate deactivation methods
deactivate_quickly is misnamed these days; it was originally used
for quickly tearing down a device for sleep and such.  But these
days it's used for the bulk of device deactivation.  Only the wifi
class used the actual deactivate method.  So combine the two and
make device implementations less complicated.
2011-02-24 11:27:42 -06:00
Dan Williams
e050f44ab6 core: flush IPv6 routes even if configuration failed (bgo #641333)
If configuration fails, there won't be an IPv6 config for the device,
thus the route flush when deactivating the device if it fails would
only flush IPv4 routes.  We don't know how far through IPv6 setup
we got, so we do want to flush IPv6 routes on deactivate if we
started IPv6 config at any point.
2011-02-23 17:20:19 -06:00
Robert Piasek
c957d68855 gentoo: simplify OpenRC detection 2011-02-23 12:24:50 -06:00
Dan Williams
eab5851145 libnm-util: remove nm_warning/nm_info/nm_error macros
Clients need to do their own logging using glib or whatever; these
macros while somewhat helpful were not flexible and are not a
substitute for actual logging in the client.  g_warning, g_message,
and g_error are more suitable anyway.
2011-02-23 11:42:04 -06:00
Dan Williams
b599e3e5dc libnm-util: simplify nm_utils_ssid_to_utf8()
It's always used with a GByteArray anyway, as are most
functions in nm-utils.h.  Even better, we can skip the
memcpy since it turns out to be pointless.
2011-02-23 11:24:58 -06:00
Dan Williams
c5cc53a557 core: add new SECONDARIES device state for dependent connections
Will be used for things like activating a VPN connection before
signaling that the device is activated, or maybe for bridges and
bonds, to ensure that applications don't think the system has
connectivity before everything is set up.
2011-02-23 10:25:49 -06:00
Dan Williams
30f39c172b ifcfg-rh: remove pointless log message
It's just noise, and would get printed whenever the backing file
changed on-disk, even if the contents didn't change.
2011-02-23 00:02:17 -06:00
Jiří Klimeš
5444a35693 dns: fix up updating resolv.conf (rh #672282) 2011-02-22 18:30:29 +01:00
Dan Williams
a096d3a676 build: allow disabling PPP support at build time
Pass --enable-ppp=no and pppd headers won't be required, and the
pppd plugin won't be built.  Here's to you, Gentoo!
2011-02-21 17:48:08 -06:00
Dan Williams
b712274e86 core: fix dbus-glib crash on shutdown with systemd
It's really dbus-glib's fault, but the problem seems to be that when
short-lived D-Bus calls are made (with dbus_g_proxy_call_no_reply)
and the service is activated, then quits immediately like the
dispatcher does, there's not enough time for internal dbus-glib
housekeeping.  The GetNameOwner call that's kicked off when the
DBusGProxy is created hasn't returned by the time the proxy is
being unrefed, so the proxy doesn't end up on the
unassociated_proxies list.  But when the proxy is destroyed, and
it destroys it's DBusGProxyManager, the manager expects that
the proxy is on unassociated_proxies.  Thus the crash.

I'm not entirely sure why we hit this only at shutdown with
systemd; it could be that systemd is killing the bus daemon at
the same time as we're running the dispatcher and that's why the
GetNameOwner call doesn't complete.

Work around all this by expecting a message return, which works fine
during normal operation, but on shutdown allows us to avoid urefing
the proxy until everything in dbus-glib has been handled, which at
shutdown time really just means leaking it.  But then we exit, so
it's cleaned up anyway.
2011-02-21 17:18:41 -06:00
Dan Williams
47bc080af8 settings: fix connection removed signal for default wired connection
Somewhat confusingly named signals...
2011-02-15 12:27:52 -06:00
Dan Williams
745c262568 Revert "core: don't trap SIGINT"
This reverts commit 3a47e57f68.

Forgot Ctl+C does SIGINT, which we use a ton when developing.  Oops!
2011-02-15 12:24:05 -06:00
Dan Williams
9d79387966 ifnet: clean up after tests by removing generated files 2011-02-15 12:04:42 -06:00
Dan Williams
5bcb0832e5 settings: move system-settings/plugins => src/settings/plugins 2011-02-15 11:55:34 -06:00
Dan Williams
3a47e57f68 core: don't trap SIGINT
Let debuggers handle it like they're supposed to.
2011-02-15 11:35:56 -06:00
Dan Williams
ec115ed442 api: add additional NM daemon states
DISCONNECTING: the only active network connection is now being disconnected
LOCAL, SITE, GLOBAL: one-stop items for level of connectivity, which
we'll use to show when we think we're actually connected to the internet
or behind a captive portal or something
2011-02-14 17:55:27 -06:00
Dan Williams
a661f78890 api: remove deprecated methods and signals
sleep, wake, StateChange, all deprecated in 0.8, are now removed.

sleep & wake are replaced with the Sleep() method, while
StateChange is replaced with the StateChanged signal which has
the same arguments.
2011-02-14 17:33:16 -06:00
Dan Williams
7971227011 api: add two more device states (IP_CHECK and DEACTIVATING)
We'll use IP_CHECK for detecting whether we're behind a captive
portal or on a network that does not have access to the Internet.
We'll probably run some variety of plugins during this stage to
help detect this, and possibly handle it for us (auto-login to
captive portal for example).

DEACTIVATING will be used for tearing down network shares or
cleanly closing network sessions when we're able to clean up
an activation.  ie, "pre-down" for Debian.
2011-02-14 17:09:36 -06:00