Commit graph

7920 commits

Author SHA1 Message Date
Dan Winship d575381c28 settings: fix unmanaging of InfiniBand devices
ifcfg-rh didn't let you unmanage an InfiniBand device by hardware
address because it was recording the hardware address with uppercase
letters, while nm_match_spec_hwaddr() required lowercase. Fix this by
making nm_match_spec_hwaddr() match case-insensitively (and remove the
manual lowercasing that several other places were doing to work around
this.)

keyfile didn't let you unmanage an InfiniBand device by hardware
address because it only accepted ARPHRD_ETHER hardware addresses. Fix
that by using nm_utils_hwaddr_valid() instead.
2013-06-13 15:52:51 -03:00
Dan Winship 9a73db17d5 libnm-util: add nm_utils_hwaddr_valid() 2013-06-13 15:52:51 -03:00
Dan Winship bc1a764e1a platform: fix recognition of InfiniBand devices 2013-06-13 15:52:50 -03:00
Dan Winship c347ac2123 build: allow building against system libndp 2013-06-13 10:24:01 -03:00
Dan Winship c89acbdc8f build: don't install libndp 2013-06-13 10:24:01 -03:00
Jiří Klimeš a91eafdf95 cli: 'con add': make ifname mandatory (except bond,bridge,vlan) (bgo #698113)
Optional 'ifname' allowed creating connection applicable to all interfaces,
which was confusing for some users. Now we require the user to provide ifname
to lock the connection for an interface. An "unbound" connection can be
created with ifname "*".

$ nmcli connection add type eth ifname eth0

$ nmcli connection add type eth
now becomes
$ nmcli connection add type eth ifname "*"

bond, bridge:
- when ifname is not specified or is "*",
  interface name is generated (nm-bond, nm-bridge)
vlan:
- when ifname is not specified or is "*",
  vlan device is named "dev.id"

Note: the quotes around * are required to suppress shell expansion.
2013-06-13 10:29:22 +02:00
Jiří Klimeš 88d9db0cdb libnm-util: make some error messages clearer
The 'setting' gerund could be confused with 'setting' as a NMSetting.
2013-06-13 10:05:18 +02:00
Jiří Klimeš 816ac9ee70 libnm-util: prefix errors with 'setting.property' instead of 'property' only 2013-06-13 10:05:18 +02:00
Dan Williams 2cb9bc9bda settings: let NMSettingsConnection unregister itself
Originally it was to keep logical balance, since NMSettings exports
the NMSettingsConnection to D-Bus, but it's kind of pointless to
spend some LoC just for that.
2013-06-11 12:48:15 -05:00
Dan Williams 3ee0203b8c api: note that the Ip4Address property is deprecated 2013-06-11 12:48:15 -05:00
Dan Williams b10c4778c0 libnm-glib: fix device description with newer udev versions
At some point ID_MODEL_FROM_DATABASE became what we should look for; fixes
device description not being constructed for many devices.
2013-06-11 12:48:15 -05:00
Dan Winship 77dda53b50 devices: use NMPlatform to find the hardware address length
For device types that don't override it, make
nm_device_get_hw_addr_len() use NMPlatform to find out the actual
hardware address length, rather than just defaulting to ETH_ALEN.
Fixes warnings in the logs when using tun or gre devices.
2013-06-11 09:27:45 -03:00
Dan Winship 6975645497 core: Use length-based hwaddr functions
Use nm_utils_hwaddr_aton_len() and nm_utils_hwaddr_ntoa_len(), to
simplify code, and (eventually) better support non-ethernet,
non-infiniband devices.
2013-06-11 09:27:45 -03:00
Dan Winship 82ac7da754 libnm-util: add hwaddr functions that take length rather than type
Add nm_utils_hwaddr_ntoa_len() and nm_utils_hwaddr_aton_len(), which
take a length rather than a type, which is generally more convenient,
and also necessary if you might be encountering devices of unknown
types.
2013-06-11 09:27:45 -03:00
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 Winship 3b498b3ec0 libnm-glib: fix the object creation warning for remote connections
NMRemoteConnection is not a NMObject, so we can't always use
nm_object_get_path(),

https://bugzilla.gnome.org/show_bug.cgi?id=701762
2013-06-08 12:27:03 -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
Sandeep Shedmake 10f3a97889 po: updated Marathi (mr) translation (bgo #701686) 2013-06-07 22:04:56 +02:00
Manoj Kumar Giri 28bbfe63af po: updated Oriya (Odia) (or) translation (bgo #701389) 2013-06-07 22:01:59 +02:00
Shankar Prasad 381cefeb71 po: updated Kannada (kn) translation (bgo #701186) 2013-06-07 21:59:35 +02:00
Nilamdyuti Goswami ea562ce570 po: updated Assamese (as) translation (bgo #701184) 2013-06-07 21:55:46 +02:00
Milo Casagrande cebd358d12 po: updated Italian (it) translation (bgo #701152) 2013-06-07 21:52:36 +02:00
Sweta Kothari 3343eaabf0 po: updated Gujarati (gu) translation (bgo #701080) 2013-06-07 21:48:48 +02: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
Pavel Šimerda ea3a748cbc rdisc: update libndp submodule 2013-06-07 13:23:17 +02: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 10c94acbb7 update .gitignore 2013-06-06 09:45:59 -03:00
Dan Winship 1dac0722d1 devices: fix a small bug in earlier commit that causes warnings 2013-06-06 08:46:45 -03:00
Dan Williams a1dde9b516 cli: use a table for setting details functions
It's a bit clearer to find the setting and add new ones.
2013-06-06 10:06:39 +02:00
Pavel Šimerda bbce69491a rdisc: build libndp recursively 2013-06-06 06:47:17 +02: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 46853f0821 libnm-util: deprecate 'network-type' and 'allowed-bands' in GSM settings
When requesting connections to ModemManager, NetworkManager shouldn't try to
request specific bands or network types to use. Leave those requests to other
system configuration tools talking directly to ModemManager.

https://bugzilla.gnome.org/show_bug.cgi?id=701504
2013-06-05 12:39:24 -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