Commit Graph

4279 Commits

Author SHA1 Message Date
Dan Winship
8566f6090d vpn-manager: fix previous commit
Somehow this got broken...
2013-06-10 11:07:37 -03:00
Dan Winship
63ea8e5779 devices: fix warning when creating bluetooth device
nm_device_bt_new() was trying to set NM_DEVICE_MANAGED, but that's
been read-only now for a while. Fortunately, it was already trying to
set it to FALSE, which is the default, so we can just remove that
line.

https://bugzilla.gnome.org/show_bug.cgi?id=701715
2013-06-10 10:36:13 -03:00
Dan Winship
8feb3878f9 vpn-manager: fix PropertiesChanged on NMVpnConnection
We need to register NMVpnConnection's properties with the
PropertiesChanged signal (which it inherits from NMActiveConnection)
or it will ignore them.

https://bugzilla.gnome.org/show_bug.cgi?id=701713
2013-06-10 10:35:13 -03:00
Dan Williams
790c102fff wired: ignore carrier state for manual/static bridge and bond connections
NM is supposed to ignore carrier and slave states for manual/static
connections when bringing up bonds and bridges, on the theory that
since static configuration does not require connectivity, there's
no need to wait for that connectivity to happen. This wasn't
happening during the IP configuration phase, but was happening
before getting to the IP config phase where the device waits
for slaves before starting IP configuration if the method
requires connectivity.
2013-06-07 15:22:24 -05:00
Dan Williams
309ecf4f90 wifi: remove NMSupplicantInfo pending call tracking struct
The sole purpose of this structure was to track in-progress D-Bus
pending calls, so that they could be selectively canceled if the
supplicant got disconnected during assocation (canceling only
assocation-related calls) or if the supplicant went away (canceling
both assocation-related and general calls).  But its only benefit
over NMCallStore alone was knowing which list of pending calls to
remove the current pending call from, and we can just explicitly
do that in the code instead.

Thus, the SupplicantInfo structure is removed and replaced with
explicitly adding and removing the pending calls from the call
store.

(The DBusGProxy is not referenced by dbus_g_proxy_begin_call(),
the caller is expected to hold a reference to the proxy for as long
as necessary, and when the proxy is destroyed, all its pending calls
will be canceled.  Since the supplicant interface owns the proxies,
there's no possibility that the proxy will outlive the supplicant
interface and thus call back into it when its dead.  The old code
referenced the supplicant interface over the life of the pending
call, but that's not necessary.)
2013-06-07 11:33:42 -05:00
Dan Williams
1666b0c306 wifi: move NMCallStore to the supplicant code
Which is the only place it's used.
2013-06-07 11:33:42 -05:00
Dan Williams
e65c2e6eb4 wifi: simplify NMCallStore
Its only purpose is to track a number of DBusGProxyCalls to let
us cancel them all at the same time, without having to track each
call individually in the supplicant code.  Instead of abstracting
it to the level of GObject and gpointer, just use the types it's
meant for.
2013-06-07 11:33:42 -05:00
Dan Williams
a95c57887c wifi: fix obvious copy & paste bug
The supplicant info object should be passed the DBusGProxy that
we're about to use, not some other proxy.
2013-06-07 11:33:21 -05:00
Dan Williams
2702ea573a Revert "wifi: fix compatibility with wpa_supplicant 0.7.x"
This reverts commit 7902787263.

We'll be requiring wpa_supplicant 1.0+ from now on. wpa_supplicant
1.0 is over a year old a this point, so it's not unrealistic to
bump the requirement.

NOTE: you really do want 1.1 or later anyway if you want to
successfully use WPA-EAP networks, since that version has fixes
to correctly handle PMKSA preauthentication, otherwise you'll
get periodic disconnections on enterprise networks.
2013-06-07 11:33:21 -05:00
Aleksander Morgado
9d52a32c8f device-modem: fix setting initial ip-iface in old MM managed modems
'NM_DEVICE_IP_IFACE' has never been a writable property, just skip it and
explicitly call 'nm_device_set_ip_iface()' when the modem is managed by the old
ModemManager.

https://bugzilla.gnome.org/show_bug.cgi?id=701712
2013-06-07 13:17:37 -03:00
Dan Winship
8a93c83161 platform: fix type_name of unknown devices
The whole point of having type_name separate from type was so that
unknown devices could still have known device types. But I wrote it
wrong and then didn't notice until explicitly vxlan support got
removed and vxlans started showing up as "unknown".
2013-06-07 11:07:40 -03:00
Dan Williams
bc60d37050 platform: fix enumeration of devices at startup to use udev after 2fe8019a
nm_platform_query_devices() was just looking in the link_cache,
completely ignoring udev, which means that the link list wasn't
filtered for things NM wants to ignore.
2013-06-06 11:41:30 -05:00
Dan Winship
1dac0722d1 devices: fix a small bug in earlier commit that causes warnings 2013-06-06 08:46:45 -03:00
Dan Winship
b322c0dc81 devices: make constructors take an NMPlatformLink
Rather than passing UDI, ifname, and driver name to the device
constructors as separate arguments, just pass the NMPlatformLink
instead and let it parse them out.

Virtual types still take UDI and ifname separately, since we create
fake NMDevices for them for autoactivating connections. That's weird
in other ways too though, so perhaps this should be revisted.
2013-06-05 17:49:25 -03:00
Dan Winship
05216f67d6 platform: add NMPlatformLink.parent, sort link_get_all() output
Add a "parent" field to NMPlatformLink, giving the parent device
ifindex for devices that have a parent.

Make nm_platform_link_get_all() sort the links before returning them,
so that masters appear after all of their slaves, and parent devices
appear before their children.

Remove the second call to nm_platform_query_devices() from NMManager
since it is now guaranteed that an NMDeviceVLAN's parent NMDevice will
have been created before the NMDeviceVLAN.
2013-06-05 17:49:25 -03:00
Dan Winship
2fe8019a79 platform: merge remaining NMUdevManager functionality into NMLinuxPlatform
Merge the net-subsystem-monitoring functionality of NMUdevManager into
NMLinuxPlatform (and kill NMUdevManager). NMLinuxPlatform now only
emits link-added signals after udev processes the device, and uses
udev attributes to further identify the device. NMManager now
identifies devices solely based on the NMLinkType provided by the
platform.
2013-06-05 17:49:25 -03:00
Dan Winship
ce5da1933d core: split NMAtmManager out of NMUdevManager
Split the "atm"-subsystem-monitoring parts of NMUdevManager into a
separate class. Now NMUdevManager only handles "net"-subsystem device
enumeration.
2013-06-05 17:49:25 -03:00
Dan Winship
b15fb8641e core: split NMRfkillManager out of NMUdevManager
Split the rfkill-monitoring parts of NMUdevManager into a separate
class. Now NMUdevManager only handles device enumeration.
2013-06-05 17:49:24 -03:00
Aleksander Morgado
c3706810ef modem-manager: read 'SupportedCapabilities' instead of 'ModemCapabilities' (bgo #701668)
There is no longer a 'ModemCapabilities' uint32 property; instead we have
'SupportedCapabilities' giving a list of uint32 values. Just read the list and
merge the values into a single mask; NM doesn't care about the exact
combinations supported.

https://bugzilla.gnome.org/show_bug.cgi?id=701668
2013-06-05 12:59:32 -05:00
Dan Williams
b0863cbc4d mobile: don't fail in old MM code when using deprecated functions
We want to keep using these deprecated functions when talking to
the old ModemManager to ensure behavior is unchanged.
2013-06-05 12:42:12 -05:00
Aleksander Morgado
e682e6d6d0 modem-manager: don't request allowed modes when talking to ModemManager1 modems
Just let them get connected with whatever network type they currently have.
2013-06-05 12:17:09 -05:00
Dan Winship
f3db2ae95c platform: add some ifdefs to support kernel 3.6 2013-06-04 12:01:38 -03:00
Dan Winship
a7068f48c5 Revert "platform, devices: add support for vxlan devices"
This requires a very recent kernel to even compile, and the kernel
code is still rapidly changing (eg, adding IPv6 support). So take it
out for now, until it stabilizes.

This reverts commit 7f0f04d106.
2013-06-04 10:30:30 -03:00
Dan Winship
d9e0a7cbd6 platform, devices: add support for gre and gretap devices 2013-06-04 10:01:14 -03:00
Dan Winship
7f0f04d106 platform, devices: add support for vxlan devices 2013-06-04 10:01:14 -03:00
Dan Winship
e9f364548a platform, devices: add support for macvlan and macvtap devices 2013-06-04 10:01:13 -03:00
Dan Winship
add316a403 platform, devices: add support for tun and tap devices 2013-06-04 10:01:13 -03:00
Dan Winship
329960bc18 platform: add support for ifb devices
(ifb devices have no device-type-specific properties, so they are
fully handled by NMDeviceGeneric without needing their own subclass).
2013-06-04 09:57:37 -03:00
Jiří Klimeš
5875e17769 ifcfg-rh: ignore team connections until we support team devices (rh #968268)
https://fedorahosted.org/libteam/
team connections are marked by
DEVICETYPE="Team"
or
DEVICETYPE="TeamPort"
2013-06-04 13:21:04 +02:00
Aleksander Morgado
0477becfae modem-manager: consolidate capabilities loading
Make capabilities loading a method in the NMModem class, and let subclasses
implement it.
2013-06-03 13:00:04 -05:00
Aleksander Morgado
e071cb962e device-modem: fix setting current capabilities 2013-06-03 12:59:57 -05:00
Dan Williams
d6f1d09604 mobile: move old MM modem properties parsing in NMModemOld 2013-06-03 12:59:49 -05:00
Dan Williams
88b26172d6 mobile: merge NMModemGsm into NMModemOld 2013-06-03 12:59:49 -05:00
Dan Williams
27acebe862 mobile: merge NMModemCdma into NMModemOld
GSM is next...
2013-06-03 12:59:49 -05:00
Dan Williams
06499b1e1b mobile: make modem errors generic
We'll use them eventually for the old CDMA and GSM types too.
2013-06-03 12:59:49 -05:00
Dan Williams
67ef73119e mobile: remove some unused code 2013-06-03 12:59:49 -05:00
Dan Williams
da5177cecd mobile: move and rename old MM modem state enum 2013-06-03 12:59:49 -05:00
Dan Williams
ab69e9bc2a mobile: rename old MM bits to clarify that they're for old ModemManager 2013-06-03 12:59:48 -05:00
Jiří Klimeš
baf820e0c1 main: allow daemonizing again - initialize become_daemon to TRUE (bgo #701383)
7ff3d1500e reversed become_daemon for
"--no-daemon" with G_OPTION_FLAG_REVERSE, but missed to reverse initialization
into become_daemon=TRUE and thus NM couldn't be daemonized.

https://bugzilla.gnome.org/show_bug.cgi?id=701383
2013-06-03 12:44:51 +02:00
Dan Williams
cae49f0422 core: not all callers of hw_bring_up care about firmware 2013-05-31 15:34:40 -05:00
Dan Winship
43617d4c1d libnm-util: deprecate nm_utils_slist_free(), use g_slist_free_full() 2013-05-29 17:13:30 -03:00
Dan Williams
c7c8655832 settings: remove duplicated dbus_g_method_return()
Could cause a crash when updating a connection, since dbus-glib may
clear DBusGMethodInvocation resources during this method.  Since
update_complete() is actually our completion/cleanup handler for
this operation chain, we can remove the standalone call to
dbus_g_method_return().
2013-05-29 14:53:45 -05:00
Dan Williams
7f6d10f3c3 trivial: rename some old ModemManager defines 2013-05-29 10:31:22 -05:00
Dan Williams
59222e562b settings: implement Save() function for connections 2013-05-28 12:26:56 -05:00
Dan Williams
8a79fb1d41 settings: implement ability to add connections without saving them to disk
We don't always want to immediately write new connections to disk, to
facilitate "runtime" or "temporary" connections where an interface's
runtime config isn't backed by on-disk config.  Also, just because
an interface's configuration is changed doesn't necessarily mean
that new configuration should be written to disk either.

Add D-Bus methods for adding new connections and for updating existing
connections that don't immediately save the connection to disk.

Also add infrastructure to indicate to plugins that the new connection
shouldn't be immediately saved if the connection was added with the
new method.
2013-05-28 12:26:56 -05:00
Dan Williams
f73d066382 ifnet: don't require a conn_name when creating an ifnet connection
If the connection doesn't yet have a conn_name, that means it's not
yet saved to disk.
2013-05-28 12:26:56 -05:00
Dan Williams
689dadaffb ifnet: track connections by UUID not conf.d net connection name
We'll need this for later with unsaved connections.  The ifnet
plugin previously tracked connections by the "conn_name" which
was derived from keys in the /etc/conf.d/net file.  These keys
take two forms:

1) interface name

config_eth0=(
"192.168.4.121/24"
"dhcp6"
)

2) wifi SSID, either text or hex-encoded:

config_myssid=("dhcp")
config_0xab3ace=("dhcp")

The conf.d net connection name is apparently usually an interface
name, so when writing to /etc/conf.d/net the NM connection name is
changed from eg "Ethernet connection 1" to the next available
interface name based on the type of connection, eg "eth0".

The ifnet plugin actively removed connections that were not present
in /etc/conf.d/net during the reload_connections() call, but in the
future we'll want to allow unsaved connections which in the case of
ifnet clearly won't yet be written to the file.  Since only
connections written to the file have a "conn_name", tracking
connections by conn_name no longer works.
2013-05-28 12:26:55 -05:00
Dan Williams
d35cdcc7d7 ifcfg-rh: don't require a path when creating an ifcfg-rh connection 2013-05-28 12:26:55 -05:00
Dan Williams
b225a9f53b ifcfg-rh: track connections by UUID not file path
We'll need this for later with unsaved connections.
2013-05-28 12:26:55 -05:00
Dan Williams
9d94000c69 keyfile: don't require a path when creating a keyfile connection 2013-05-28 12:26:55 -05:00