Commit graph

3190 commits

Author SHA1 Message Date
Dan Williams
5ff70384e1 trivial: use define for supplicant interface state signal
Helps when you need to grep the code to change a signal's signature.
Otherwise you're stuck grepping for "state" which a lot of objects
have as a signal name.
2012-09-12 11:28:43 -05:00
Dan Williams
84a2910f47 trivial: whitespace fixup 2012-09-12 10:13:54 -05:00
Dan Williams
d42d41c1ac core: add cancelation to dispatcher calls 2012-09-11 17:17:58 -05:00
Dan Williams
15ca7cd56c core: add dispatcher callbacks and simplify dispatcher function prototypes
Remove unused args for the non-VPN cases to cut down on the NULL NULL NULL
stuff since we're also adding two more arguments.  Add the ability for
callers to give a callback that should be called when the dispatcher is
done.
2012-09-11 17:06:16 -05:00
Dan Williams
0201d6da87 core: convert dispatcher to asynchronous operation and return its results
In preparation for making NM wait on the dispatcher, make the dispatcher
call scripts asynchronously, and report the script results back to NM.
2012-09-11 17:06:16 -05:00
Dan Williams
cf255aa83b core: split dispatcher into its own file 2012-09-11 17:06:16 -05:00
Marius B. Kotsbak
c4a85acf80 core: add settings for 4G (LTE) network modes
NM_SETTING_GSM_NETWORK_TYPE_PREFER_4G and NM_SETTING_GSM_NETWORK_TYPE_4G added.
2012-09-11 11:47:22 -05:00
Jiří Klimeš
585564b9f5 dnsmasq: don't crash when there are no nameservers in IP config (rh #768531) 2012-09-06 11:40:52 +02:00
Jiří Klimeš
ddc3f727d0 core: fix a regression causing that driver and firmware versions are not set
Regression caused by 6ba93343e6
2012-09-03 16:18:54 +02:00
Dan Williams
2318b3c525 wired: ensure carrier changes clear queued state where appropriate
Buggy kernel drivers sometimes default the carrier to ON when they
are capable of link-detection but the carrier is actually off, and
they quickly switch the carrier OFF when they determine actual
carrier state (cdc-ether, for example).

The initial carrier ON event would trigger a queued state change
from UNAVAILABLE to DISCONNECTED, which may auto-activate the
device.  But before that state change happens, if a carrier OFF
event comes in, that queued state was not getting cleared and
the device would transition to DISCONNECTED even though the
carrier was off.

To ensure that never happens, and that we don't enter states that
aren't valid when the carrier is off, we need to clear any queued
state changes that wouldn't be valid in the new carrier state.
2012-08-30 16:04:13 -05:00
Dan Williams
46e0af2942 ip6: ignore cached/cloned routes when retrieving IPv6 config (lp:1038541) (bgo #671767)
Should also ignore them when building up the initial IPv6 config.
2012-08-30 16:04:13 -05:00
Ben Jencks
3ca3120e4a ip6: ignore cached/cloned route notifications from the kernel (lp:1038541) (bgo #671767)
The kernel periodically adds routes for specific operations, including
when pinging any host.  These are temporary routes and aren't part of
the interface's permanent routing configuration, so we should ignore
them.
2012-08-30 16:04:13 -05:00
Dan Williams
c8c7690bb4 bluetooth: predicate DUN availability on ModemManager availability
If ModemManager isn't running, don't put DUN connections into
AvailableConnections, and don't allow DUN connections to be started
either automatically or manually.
2012-08-29 17:39:33 -05:00
Dan Williams
e6061a1e96 api: add a "ModemManager unavailable" device state reason
To be used when MM quits unexpectedly, or isn't running and the
device needs MM.
2012-08-29 17:39:33 -05:00
Dan Williams
0111d4dbd7 modem: fix DNS configuration with static IP modems
The MM API defines the GetIP4Config method return as (uuuu) which
is [ IP, DNS1, DNS2, DNS3 ].  Unfortunately the for() loop in the
static_stage3_done() function started at index 0, which is the IP
address.  This caused the IP address to be added to the DNS list.
It should start at index 1 instead.
2012-08-28 19:58:22 -05:00
Dan Williams
ae544fe435 modem: log IPv4 configuration 2012-08-28 11:35:28 -05:00
Dan Winship
2062a98851 core: remove erroneous reference to VLAN-over-IPoIB 2012-08-27 13:27:35 -04:00
Dan Williams
9379a729f4 core: handle return values from libsystemd-login correctly
The functions return an 'int', which can be < 0 for errors, so
we can't just treat the return value as a boolean.
2012-08-27 09:55:04 -05:00
Dan Williams
052a24343e modem: track modem state and fail device if modem disconnects
This worked fine with PPP because PPP terminates, and NM watches
for that and handles it fine.  But modems with pseudo-ethernet ports
don't have anything like that, so we have to watch the modem's state
property instead.  This works only with MM 0.5.4 and later (including
0.6).
2012-08-24 13:24:16 -05:00
Dan Williams
722ce46aaa core: ignore PPP interface removal signals from udev
PPP interfaces are transient and created by their master interface
(usually for PPPoE or WWAN) and thus we don't want their removal
to affect their master device.  Unfortunately, that was happening
when a manual 'killall -TERM pppd' was run, which caused the
udev device removal signal, which caused NM to remove the master
WWAN device when udev signaled that the 'ppp' interface was gone.
2012-08-24 12:06:22 -05:00
Dan Williams
55542ffb3e vlan: fix missing chain up to parent dispose
Otherwise the parent classes (like NMDevice) don't clean up correctly.
2012-08-24 12:06:22 -05:00
Dan Williams
6ba93343e6 core: fix possible uninitialized memory usage 2012-08-24 12:06:22 -05:00
Jiří Klimeš
b39804ae6b trivial: use dashes in "br2684-bridge-failed" to match other reason strings 2012-08-22 13:40:46 +02:00
Dan Williams
ef4f6a2e55 rfkill: detect "acpi" subsystem devices as platform devices (bgo #680632)
Some rfkill drivers (sony-laptop, ideapad-laptop, classmate-laptop,
etc) register their rfkill drivers under the "acpi" subsystem instead
of the platform subsystem, but the semantics are the same.
2012-08-17 15:31:57 -05:00
Dan Williams
0065165901 rfkill: fix up grandparent driver name detection 2012-08-17 15:28:17 -05:00
Dan Williams
ee920262ac rfkill: better logging of platform switches and states 2012-08-17 15:27:58 -05:00
Dan Williams
3ba28d9b16 wifi: ensure hidden SSIDs get added to AvailableConnections
Hidden SSIDs won't always show up in the scan list, so they need
to be present in AvailableConnections even if we don't see them
int he scan list.
2012-08-16 13:16:42 -05:00
Dan Williams
e962f06253 keyfile: use friendly MAC address format for WiMAX 2012-08-15 16:51:59 -05:00
Nathanael D. Noblet
808136ac02 core: add AvailableConnections property for NMDevice objects
Implements a new property that provides a list of currently
available connections a device could connect to. For example
if a connection for a particular wireless connection exists and
that wireless network appears in the scan list it would show in the
AvailableConnections property of the device.

(dcbw: found a slightly cleaner way to do this; it's a lot like the
check_connection_compatible class method, except it deals with
live network data too.  So convert the subclass methods to
just check additional live network data, and have the base
device class handle adding the connection to the hash and all
the associated signalling.  Also fix a bug where the available
connections were not updated when a device moved from UNAVAILABLE
to available, its available connections were not updated)
2012-08-15 16:50:49 -05:00
Paul Menzel
b2d97cc96c ifnet: fix typo fut*u*re 2012-08-15 14:24:50 -05:00
Pavel Šimerda
3e0f1d9129 dns: remove broken bind plugin 2012-08-15 12:24:20 -05:00
Dan Williams
ad49bc7b8e wimax: add missing copyright header 2012-08-06 17:58:16 -05:00
Dan Williams
1d7949e66c build: fix up includes; prefer builddir over srcdir
WiMAX failed distcheck if the iwmxsdk devel files were installed but
--enable-wimax=no was used, since the distcheck configure bits found
the iwmxsdk headers, defaulted WiMAX support to 'on', and then proceeded
to use the generated headers from the top srcdir, where of course
wimax was turned off (due to --enable-wimax=no).  Instead, everything
should use the headers from the builddir, which reflects the options
that 'make distcheck' actually selects.

At the same time, re-order various includes everywhere to ensure that
the builddir paths come before the srcdir paths to prevent this from
happening in the future.
2012-08-06 17:27:17 -05:00
Ross Vandegrift
43d4d16b5b ifupdown: Allow netmask to be CIDR-style prefix length (bgo #679123) 2012-08-06 15:07:42 -05:00
Pavel Šimerda
4fdca493ad ifupdown: testcase for CIDR-style prefix length (bgo #679123) 2012-08-06 15:07:42 -05:00
Dan Williams
f3b7e71b34 core: fix compat VLAN interface addition when interface already exists
If the interface already exists, the compat code would fail.  Fix that
and clean up the function.  Also double-check that an existing VLAN
interface that has the name we expect also has the master and VLAN
ID we expect.
2012-08-06 13:05:05 -05:00
Dan Williams
82f4fd6545 core: add compat function for determining interface type
libnl2 and earlier do not implement rtnl_link_get_kernel() and
thus we need compat code to determine whether an interface is
a bond or a VLAN.  Previously, the VLAN code would simply assert
and cause NM to exit when running with libnl2 or earlier because
the interface type could not be determined.
2012-08-02 20:56:46 -05:00
Dan Williams
54dd265001 core: don't generate WiMAX glib enums when WiMAX isn't enabled
The enum generator stuff apparently includes any #include in source or
header files that it's given, which was causing nm-enum-types.c to
include files from the Intel WiMAX SDK even when WiMAX wasn't enabled.
2012-08-02 15:39:02 -05:00
Dan Winship
a13d4e9d3d build: fix build after addition of new warnings 2012-08-01 09:48:03 -04:00
Jiří Klimeš
edb85e9720 core: fix NM_IS_*_CLASS(klass) macros
The argument is 'klass' not 'obj'.
2012-07-27 13:15:54 +02:00
Jiří Klimeš
915cfe8ce8 docs: update FSF address in license headers 2012-07-26 16:25:20 +02:00
Jakub Dorňák
ac152ece02 dnsmasq: allow custom configuration via files in /etc/NetworkManager/dnsmasq.d (bgo #679628)
We don't use the default dnsmasq directory because packages often drop files
there that don't take account of NM's specific use-case and end up conflicting
with the specific local caching nameserver functionality that NM uses dnsmasq
for.  NM's private dnsmasq is orthogonal to whatever global dnsmasq
daemon may be running, and with that daemons configuration.

(dcbw: change directory to private one)
2012-07-25 13:18:14 -05:00
Jiří Klimeš
e0e804b30b bluetooth: fix a typo in dbus_g_error_has_name() function name 2012-07-25 16:00:05 +02:00
Dan Williams
1f4b97c878 bluetooth: ignore more Bluez launch failures
If bluez is started by systemd but for some reason is not set to
be D-Bus activated (as seems to be the case on Fedora 16 and later),
then don't emit a warning.
2012-07-24 12:57:42 -05:00
Dan Williams
346a1dc957 core: suppress a warning when a connection is assumed
When NM takes over a device's existing connection, it'll jump right
from "unavailable" to "ip-config" states, thus leading to the
warning.
2012-07-24 12:12:18 -05:00
Pavel Šimerda
a1659adec0 ip4: fix connection assumption 2012-07-24 10:17:47 -05:00
Dan Winship
3324bd2cdf ifcfg-rh: ignore IP config on bond slaves
NM was requiring that bond slaves have either no IP config or an
explicit "none"/"disabled" config. But the system scripts just ignore
any IP config that is present on a slave, so change NM to do that too
(but warn about it).

https://bugzilla.redhat.com/show_bug.cgi?id=838907
2012-07-23 12:52:32 -04:00
Dan Williams
c357d5fbe5 bluetooth: suppress another Bluez warning (rh #840580)
When Bluez can't be launched for some reason, like because it
doesn't exist, ignore that.
2012-07-20 14:47:41 -05:00
Jiří Klimeš
974c39fe3e ifcfg-rh: fix a segfault when unescaping a string (rh #841391)
The crash occured for variables like these:
VAR="
VAR='
2012-07-19 14:30:29 +02:00
Jiří Klimeš
21fa0f8349 settings: fix keyfile plugin priority when explicitly configured (bgo #679655)
The regression was introduced by b38f39cfc6 that
built keyfile plugin into NM (instead of using .so).
2012-07-10 16:04:14 +02:00