Commit graph

3364 commits

Author SHA1 Message Date
Dan Williams
240cc2f233 settings: add note about killing inotify helper (bgo #532815)
We can kill this code when we depend on a new enough glib that
includes the patches from the referenced bug report.
2013-01-11 13:02:12 -06:00
Dan Williams
c72d976e46 wifi: fix supplicant interface state handling for is_available()
is_available() appears not to have been updated when supplicant
interface states were consolidated between the manager and the
interface objects long ago.  Soon after that, the supplicant
itself added some states.

The wifi device is available to activate whenever the supplicant
is READY or in one of it's operational modes, ie up until
COMPLETED.  Any other state means the supplicant is not ready.
2013-01-11 07:38:40 -06:00
Dan Williams
9c839d3417 mobile: fix handling of CDMA username/password for ModemManager1
The new MM1 bits only looked at the GSM setting, which CDMA connections
don't necessarily have.
2013-01-09 18:14:37 -06:00
Jiří Klimeš
7b10b4d468 logging: add 'DEFAULT' logging domain
It contains logging domains that are active by default. It allows users
to set default domains back easily (after they changed them).

And fix formatting of "} else if".
2013-01-09 16:47:49 +01:00
Jiří Klimeš
2952c09902 core: add GetLogging() D-Bus call to org.freedesktop.NetworkManager
Returns current logging level and domains set.
2013-01-09 16:47:49 +01:00
Aleksander Morgado
6c16796119 modem-manager: avoid assertion when exposed modem has no 3GPP/3GPP2 capabilities
If, for any reason, MM exposes a modem object without 3GPP or 3GPP2
capabilities, just return an error instead of assert()-ing.
2012-12-19 10:29:13 -06:00
Dan Williams
94d6074e26 core: fix crash on device deactivation after 'pending' branch merge
Since the manager now tracks active connections, it needs to hold
a reference to the active connection objects too.  The active
connection teardown code was changed to release that reference
(_active_connection_cleanup()) but the creation code was never
changed to remove the bits that pass ownership over the initial
reference to the NMDevice.  Fix that.
2012-12-18 21:06:02 -06:00
Jiří Klimeš
954ce65e99 ifcfg-rh: treat missing IPv6 setting as IPv6 "auto" method (rh #830434) 2012-12-18 10:40:35 +01:00
Dan Williams
c0d15e8eb2 trivial: remove unused argument 2012-12-17 17:01:11 -06:00
Dan Williams
9065f247c3 vpn: reduce memory usage a bit
No need to copy the list when (a) we never care if it gets modified
in-place (since the loops break when the connection is found) and
(b) we never modify it in place anyway.  Reduces the possibility of
leaking the list due to programming errors too.
2012-12-17 17:01:11 -06:00
Dan Williams
1fcb577e19 vpn: make nm_vpn_manager_deactivate_connection() take an object, not a path
Pointless to look up the object by its path when we already have the object.
2012-12-17 17:01:11 -06:00
Dan Williams
1b968f4021 core: simplify looking up NMActiveConnection objects by object path 2012-12-17 17:01:10 -06:00
Dan Williams
43813cc563 vpn: remove unused connection activated/deactivated signals
Replaced by watching the connections' states directly.
2012-12-17 17:01:10 -06:00
Dan Williams
f8f1a131f5 policy: monitor connection activation/deactivation via the manager
Instead of through the VPN manager.
2012-12-17 17:01:10 -06:00
Dan Williams
92ea35469d core: add manager active connection added/removed signals
Will replace the VPN manager's activated/deactivated signals; listeners
can attach to the active connection's 'state' property and listen
for the changes to ACTIVATED and DEACTIVATED.  Works for all connections,
not just VPN ones.
2012-12-17 17:01:10 -06:00
Dan Williams
6ddc25dcab core: handle some connection timestamp updating in NMActiveConnection
Handle it in the base active connection class instead of in separate
places for the device and the VPN cases.
2012-12-17 17:01:10 -06:00
Dan Williams
3a10f695b3 vpn: kill nm_vpn_manager_get_vpn_connection_for_active()
No longer required now that the manager tracks active connections.
2012-12-17 17:01:10 -06:00
Dan Williams
a64127a7c2 vpn: kill nm_vpn_manager_get_active_connections()
No longer needed now that the manager tracks active connections.
2012-12-17 17:01:10 -06:00
Dan Williams
59420add04 core: track active connections directly in the manager
Instead of using devices as a proxy for active connections, and
then also asking the VPN manager for the active connections it's
tracking, just track *all* active connections in the manager.
2012-12-17 17:01:10 -06:00
Dan Williams
7258dd270f core: add the NM_ACTIVE_CONNECTION_STATE_DEACTIVATED state
We'll use this to know when to clean up and dispose of the
active connection in the manager.
2012-12-17 17:01:10 -06:00
Dan Williams
abad22f87e vpn: kill nm_vpn_connection_get_name()
Replaced by nm_connection_get_id().
2012-12-17 17:01:10 -06:00
Dan Williams
84603c2380 core: move most activation request logic to the active connection class
We'll want to use NMActiveConnection more in the manager and also fold
the PendingActivation functionality into it.  All this functionality
applies to the VPN connections too, so it makes sense to have it all
in the base class instead of both NMActRequest and NMVPNConnection.
2012-12-17 17:01:10 -06:00
Dan Williams
7a3c53e8ff core: add header for NM object types
Helps prevent #include loops when two objects need each other's
headers, like NMActiveConnection and NMDevice.
2012-12-17 17:01:10 -06:00
Jiří Klimeš
cfb391952d policy: fix logging address for reverse-lookup in hostname4_thread_new() 2012-12-17 19:48:40 +01:00
Jiří Klimeš
383a397a92 vpn: fix ifindex value check
Valid interface indexes are greater than zero.
2012-12-13 19:06:23 +01:00
Pavel Šimerda
83c6ebcee7 ifnet: avoid -Wformat-security errors 2012-12-11 23:06:10 +01:00
Dan Williams
a455d42de2 dnsmasq: only pass confdir if it exists (rh #873621)
dnsmasq exits if the --conf-dir does not exist.  Which isn't
very useful.

Inspired by Federico Simoncelli <fsimonce@redhat.com>:
https://mail.gnome.org/archives/networkmanager-list/2012-June/msg00011.html
2012-12-06 15:18:28 -06:00
Dan Williams
fcdbf17f35 dnsmasq: trivial cleanup
Use an index variable so we dont' have to keep track of indexes
manually.
2012-12-06 15:18:24 -06:00
Dan Williams
f1f0ada0c6 wifi: always enable proactive key caching for WPA Enterprise (rh #834444)
Proactive Key Caching (also called Opportunistic Key Caching) allows
fast roaming between access points in the same SSID on large enterprise
or university networks.  Previously it was only enabled for EAP-GTC
but there's no reason to restrict it only to that EAP type, as all
large wifi deployments can benefit from it.
2012-12-06 14:58:46 -06:00
Jiří Klimeš
e7add58aad main: ensure NMSTATEDIR exists (bgo #689744)
For OSTree/gnome-ostree, the model chosen for /var is that services
are responsible for creating any data they need in /var at runtime.

Call g_mkdir_with_parents() to ensure NMSTATEDIR exists.

https://bugzilla.gnome.org/show_bug.cgi?id=689744

Based on Colin Walters' patch.
2012-12-06 16:51:17 +01:00
Mathieu Trudel-Lapierre
f41f41506c dhcp: ensure hostname is sent to the DHCP server for default wired connections
For the default wired connection (or any connection that doesn't have an IPv4
setting, which means "auto"), the hostname should always be sent to the DHCP
server to register in DNS.
2012-12-04 12:21:24 -06:00
Dan Williams
8b7287ab66 core: fix agent secret cancelation
Two issues here: first, the daemon code was using the wrong D-Bus type
(strings instead of object-path) to send the connection path to the
secret agent, which resulted in a method-not-found error and nothing
happening in the agent.

Second, the agent-side method call verification code would fail the
request anyway, becuase verify_request() determined success based
on the reconstructed connection, which isn't given when canceling
secrets requests.
2012-12-04 11:31:12 -06:00
Jiří Klimeš
cf74d74fcc sleep-monitor: make the systemd's sleep also work for GLib < 2.30
GDBus is only available from glib 2.26 and GUnixFDList from glib 2.30
2012-12-04 11:30:20 -06:00
Jiří Klimeš
3c9ba7d895 core: set GError on failures in nm-dnsmasq-manager.c:create_dm_cmd_line() 2012-12-04 16:10:46 +01:00
Jiří Klimeš
1df1e85093 core: don't crash in start_sharing() on failures (if error is NULL) (rh #883142) 2012-12-04 15:55:30 +01:00
Dan Williams
445e8755bc bridge: allow independent IPv4 and IPv6 configuration with no slaves
When no slave is present, dynamic IP configuration (DHCPv4, DHCPv6,
IPv6 autoconf) cannot proceed.  But static and link-local
configuration can.  So if IPv4 requires DHCP but IPv6 is static,
it makes no sense to block IPv6 configuration from proceeding
just because DHCPv4 cannot.
2012-11-30 13:21:51 -06:00
Dan Williams
dcecc41327 bond: allow independent IPv4 and IPv6 configuration with no slaves
When no slave is present, dynamic IP configuration (DHCPv4, DHCPv6,
IPv6 autoconf) cannot proceed.  But static and link-local
configuration can.  So if IPv4 requires DHCP but IPv6 is static,
it makes no sense to block IPv6 configuration from proceeding
just because DHCPv4 cannot.
2012-11-30 13:21:51 -06:00
Dan Williams
54f9a670f7 core: allow device subclasses to postpone IPv4 or IPv6 configuration
If, for example, a bond interface has dynamic IPv4 configuration
and static IPv6 configuration, then without slaves IPv6 config
can proceed but IPv4 cannot until a slave is present.  Allow
subclasses to postpone a specific IP configuration path until
they're ready, but let others proceed.
2012-11-30 13:21:51 -06:00
Dan Williams
a421a8c026 trivial: describe NM_ACT_STAGE_RETURN_* values 2012-11-30 13:21:51 -06:00
Dan Williams
b4a11a86f7 core: rework master/slave handling 2012-11-30 13:21:51 -06:00
Dan Williams
1472532f28 core: clarify bond enslave/release function names 2012-11-30 13:21:51 -06:00
Dan Williams
b50a141fb7 core: trivial code reorganization 2012-11-30 13:21:51 -06:00
Dan Williams
6116a84048 core: simplify nm_device_activate()
We don't need to check device state here because the manager, which
is the only thing that calls nm_device_activate() in
internal_activate_device() ensures that the device is deactivated
before starting a new activation request.
2012-11-30 13:21:51 -06:00
Jiří Klimeš
0ada524a82 keyfile: add some tests for bridges 2012-11-30 13:21:51 -06:00
Jiří Klimeš
1a7f9e661a core,libnm-glib: expose "slaves" property on NMDeviceBridge 2012-11-30 13:21:51 -06:00
Dan Williams
c091415bff core: leave disabled devices up on shutdown
Bridge/bond slaves don't really need to be taken down when we quit.
2012-11-30 13:21:51 -06:00
Thomas Graf
cfff5a63d9 bridge: add bridge device type
This adds a new device type 'bridge'. Kernel devices are created
on demand.
2012-11-30 13:21:51 -06:00
Dan Williams
20e60deccb ifcfg-rh: add support for reading/writing bridge port connections
Allows to attach any connection to a bridge using the BRIDGE= key.
IP configuration is optional for bridge components but not
prohibited. Test case included.
2012-11-30 13:21:51 -06:00
Thomas Graf
6bc5213b66 ifcfg-rh: add support for reading/writing bridge connections
Including testcase.
2012-11-30 13:21:51 -06:00
Thomas Graf
679212c03d bridge: API to to create, delete, attach, and detach bridges
Provides functions to create and delete bridging devices and
to attach/detach slaves from bridging devices.

It currently relies on the ioctl() kernel interface. The long
term goal is to use the netlink interface for this.
2012-11-30 13:21:50 -06:00