Commit Graph

8762 Commits

Author SHA1 Message Date
Loïc Yhuel
19b7fe5ca2 core: fix bridge device creation
Since 2688ae4950, bridge device creation
fails with "(br0): cannot use existing bridge for 'Bridge'" warning.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-17 11:11:27 +02:00
Enrico Nicoletto
16fa0a7a89 po: updated Brazilian Portuguese (pt_BR) translation (bgo #707991)
https://bugzilla.gnome.org/show_bug.cgi?id=707991
2013-09-16 08:56:14 +02:00
Dan Williams
0f5f6da1a5 libnm-glib: fix NMDeviceModem connection compatible check for LTE connections
The 3GPP checks didn't include LTE capabilities, so the modem connection_compatible
check would fail for LTE connections with LTE compatible devices.
2013-09-14 18:46:32 -05:00
Jiří Klimeš
ee1a43175b po: add src/nm-sleep-monitor-systemd.c into po/POTFILES.in 2013-09-13 15:07:03 +02:00
Dan Winship
1b6247fc27 sleep-monitor: add missing include 2013-09-13 09:05:07 -04:00
Bastien Nocera
bc4a8f51fb sleep-monitor: give better inhibition reason (bgo #704863)
https://bugzilla.gnome.org/show_bug.cgi?id=704863
2013-09-13 13:03:54 +02:00
Enrico Nicoletto
6106b781d8 po: updated Brazilian Portuguese (pt_BR) translation (bgo #707991)
https://bugzilla.gnome.org/show_bug.cgi?id=707991
2013-09-13 12:35:02 +02:00
Jiří Klimeš
1f6e1fbc62 cli: editor 'change' command: output -> input format conversion (rh #998929)
The format of property values that nmcli prints is not the same (for some
properties) as the format nmcli editor accepts as input from user. The reasons
are that (a) output format is more descriptive and not much suitable to be
typed, (b) it comes in most cases from libnm-util.
'change' command displays current property value and allows users to edit it.
So we convert the output into input format, before presenting it to the user.

https://bugzilla.redhat.com/show_bug.cgi?id=998929
2013-09-13 10:56:20 +02:00
Dan Williams
42b6c6eac0 core: fix call to nm_device_bring_up()
Typo in ebdf1796f1
2013-09-12 19:11:06 -05:00
Dan Winship
ebdf1796f1 core: implement :mtu and :cloned-mac-address for VLAN 2013-09-12 18:34:23 -04:00
Dan Winship
68bb65fbab core: fix nm_device_supports_vlans()
The platform knows which device types support VLANs, so just ask it,
rather than only doing VLANs on ethernet.
2013-09-12 18:34:23 -04:00
Dan Winship
e0f0f60ff5 core: remove nm_device_hwaddr_matches() / get_connection_hw_address()
These were only needed to support the possibility of VLANs having
arbitrary additional hardware settings.
2013-09-12 18:34:23 -04:00
Dan Winship
066b592241 all: standardize on NMSettingWired:mac-address for all VLANs
Currently, ethernet-based VLANs can specify the hardware address of
the parent device (and, in theory, the cloned hardware address and MTU
of the VLAN device) by using an NMSettingWired in addition to the
NMSettingVlan.

The theory was that non-ethernet-based VLANs, when we eventually
supported them, would likewise use the setting type corresponding to
their parent device. However, this turns out to be both complicated
(the settings plugins and connection editor would have a
hard-to-impossible time figuring out which setting type to use in some
cases) and incorrect (for most L2 settings [eg, BSSID, bond mode,
etc], the VLAN can't have its own values separate from the parent
device).

What we should have done was just have :mac-address,
:cloned-mac-address, and :mtu properties on NMSettingVlan. However, at
this point, for backward-compatibility, we will just stick with using
a combination of NMSettingVlan and NMSettingWired, but we will use
NMSettingWired regardless of the underlying hardware type.
2013-09-12 18:34:23 -04:00
Dan Winship
2688ae4950 core: move software device creation logic out of NMManager
Rather than having NMManager know how to parse various settings to
create each kind of software device, add a _new_for_connection()
constructor to each of them and let them call NMPlatform to create the
device correctly themselves.
2013-09-12 18:34:23 -04:00
Dan Winship
23d4973835 core: set VLAN ingress/egress maps at activation time
Rather than setting the VLAN maps when the device is created, set them
at activation time, which is more in line with how other device types
work.

Like the old code, this doesn't attempt to reset any existing
ingress/egress mappings on the device.
2013-09-12 18:34:23 -04:00
Dan Winship
fd85ec45b9 platform: fix VLAN ingress/egress map setting 2013-09-12 18:34:23 -04:00
Dan Williams
e4b92acdf7 cli: clarify 'startup' property when NM is not running
Wouldn't make a ton of sense to print "started" for the STARTING
property if NM wasn't running.
2013-09-12 13:15:50 -05:00
Dan Williams
15ddc6dce3 cli: fix build error due to possibly uninitialized variable 2013-09-12 13:13:09 -05:00
Jiří Klimeš
1df9948199 cli: add STARTUP field for 'nmcli -f all general status'
It says 'starting' when NM is in the process of startup (still activating
connections); 'started' when NM finished the startup.
2013-09-12 16:29:26 +02:00
Thomas Haller
8548d68381 nmcli: extend bash completion for 'nmcli networking connectivity'
Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-12 16:19:42 +02:00
Jiří Klimeš
641526781a man: update nmcli manual page for 'nmcli networking connectivity' 2013-09-12 15:48:03 +02:00
Jiří Klimeš
fa36216787 cli: consolidate a code for connectivity check a bit 2013-09-12 14:45:08 +02:00
Jiří Klimeš
449a0933ce cli: don't call g_strstrip() on NULL arguments
GLib-CRITICAL **: g_strchug: assertion `string != NULL' failed
GLib-CRITICAL **: g_strchomp: assertion `string != NULL' failed
2013-09-12 10:03:23 +02:00
Dan Winship
26544f3148 libnm-glib: change "Since: 0.9.10" to "Since: 0.9.8.6" for backported API 2013-09-11 14:10:55 -04:00
Jiří Klimeš
6014e3fa04 cli: fix an 'nmcli con edit' crash
nmcli> desc   AAA
2013-09-11 18:12:51 +02:00
Jiří Klimeš
625f2e3814 man: fix a typo in nmcli-examples manual page (rh #1004117)
https://bugzilla.redhat.com/show_bug.cgi?id=1004117
2013-09-10 16:46:08 +02:00
Jiří Klimeš
b62856a0bb cli: set wep-key-type properly in nmcli con edit (rh #1003945)
Accept both [0,1,2] and [unknown,key,passphrase] as wep-key-type values and
set the property value correctly.

https://bugzilla.redhat.com/show_bug.cgi?id=1003945
2013-09-10 16:23:25 +02:00
Jiří Klimeš
555e5b401c cli: reset terminal using libreadline when quitting on signal (bgo #706118)
readline() makes changes to terminal and when it doesn't receive unix signals,
it has no chance to perform cleanups on exit. So we have to call its cleanup
functions manually on exit.

https://bugzilla.gnome.org/show_bug.cgi?id=706118
2013-09-10 11:45:21 +02:00
Jiří Klimeš
663014ed62 cli: handle POSIX signals in a dedicated thread
For a multihreaded application the safest way to handle unix signals is using
a dedicated thread that processes the signals by sigwait() function. All other
threads have these signals (processed by the thread) blocked.

A few useful links:
http://pubs.opengroup.org/onlinepubs/007904975/functions/sigwait.html
http://pic.dhe.ibm.com/infocenter/aix/v6r1/index.jsp?topic=%2Fcom.ibm.aix.genprogc%2Fdoc%2Fgenprogc%2Fsignal_mgmt.htm
http://www.linuxjournal.com/article/2121?page=0,2
http://www.redwoodsoft.com/~dru/unixbook/book.chinaunix.net/special/ebook/addisonWesley/APUE2/0201433079/ch12lev1sec8.html
https://www.securecoding.cert.org/confluence/display/seccode/CON37-C.+Do+not+call+signal%28%29+in+a+multithreaded+program
2013-09-10 11:41:00 +02:00
Dan Winship
ffa012f3ce libnm-glib: fix nm_remote_connection_delete() callback
If you called nm_remote_connection_delete() on a connection whose only
ref was held by the NMRemoteSettings, then the callback would never
get called, because NMRemoteSettings would drop its ref before then
(when the connection emitted the 'removed' signal), so the callback
would get cancelled.

Fix this by taking an extra ref on the connection around the D-Bus
call in this case.

https://bugzilla.redhat.com/show_bug.cgi?id=997568
https://bugzilla.gnome.org/show_bug.cgi?id=706141
2013-09-09 09:28:24 -04:00
Daniel Drake
3f4811be22 libnm-util: accept old-style UUIDs as valid
Old versions such as 0.9.4 generated 40-character UUIDs with no
hashes, but libnm-util regards them as invalid. That means that
existing connections stop working when upgrading from 0.9.4.

Continue accepting such UUIDs as valid, and add a test so that
we don't forget in future.
2013-09-09 08:20:37 -05:00
Aurimas Černius
ff2bd46396 po: updated Lithuanian (lt) translation (bgo #706337)
https://bugzilla.gnome.org/show_bug.cgi?id=706337
2013-09-09 09:43:30 +02:00
Sandeep Shedmake
cb6fbce7f4 po: updated Marathi (mr) translation (bgo #705782)
https://bugzilla.gnome.org/show_bug.cgi?id=705782
2013-09-09 09:36:13 +02:00
Jiří Klimeš
49eda63e75 dhcp: add a testcase for distinguishing client identifier type
MAC-like string, but with an invalid char => plain ASCII string => quoted.
2013-09-09 09:14:38 +02:00
Christian Kirbach
a690f2f5c1 po: updated German (de) translation (bgo #707675)
https://bugzilla.gnome.org/show_bug.cgi?id=707675

Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-08 19:27:08 +02:00
Dan Winship
a059309628 platform: recognize Open vSwitch interfaces as Generic devices (rh #1004356)
They look exactly like normal Ethernet interfaces, but they are managed
entirely by the Open vSwitch tools in software, so NM shouldn't (yet)
touch them.  Treat them instead as generic devices that only get touched
through direct user requests.
2013-09-06 19:39:11 -05:00
Dan Williams
b415b8a468 dhcp: add testcase for quoting problematic client identifiers 2013-09-06 11:20:08 -05:00
Jiří Klimeš
1ef19f377b dhcp: string vs. byte-array of dhcp-client-identifier (rh #999503)
Distinguish properly between ASCII strings and byte arrays for
dhcp-client-identifier. Else dhclient refuses to parse the configuration
file.
2013-09-06 11:20:00 -05:00
Thomas Haller
7ad5c79441 nmcli: minor fixes in bash completion
- the ifname argument for "connection add" is not mandatory
- support the long names for connection types ("802-*")

Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-06 17:47:57 +02:00
Jiří Klimeš
4255d72b21 build: fix distcheck - missing ifupdown test files in Makefile.am 2013-09-06 17:42:07 +02:00
Jiří Klimeš
9f09ebd582 cli: forbid removing connection.uuid in editor
We expect that UUID is set, else there are various errors. Anyway, users should
not modify connection UUID.
2013-09-06 15:14:30 +02:00
Jiří Klimeš
2eede80108 cli: deny removing values of nmcli-unchangable properties
nmc_setting_reset_property() function checks whether we allow changing the property
(set_func != NULL) and if so, the property value is reset to default.
2013-09-06 15:00:34 +02:00
Jiří Klimeš
70cc30cb73 cli: add missing connection:type to nmc_add_prop_funcs() in editor 2013-09-06 14:12:26 +02:00
Jiří Klimeš
9835da7c74 libnm-util: update description of team:config and team-port:config properties 2013-09-06 13:52:27 +02:00
Jiří Klimeš
242bebfb3d cli: add 'remove' command to the interactive editor
remove <setting>[.property] | <property>

It entirely removes given setting from edited connection. If a property is given,
the command instead resets the property to its default value.

https://bugzilla.gnome.org/show_bug.cgi?id=707576
2013-09-06 10:10:37 +02:00
Jiří Klimeš
c2faf32b88 cli: 'connection add' - questionnaire mode (rh #953291)
Synopsis: nmcli --ask connection add

When '--ask' is used, nmcli will ask not only for mandatory arguments but also
for the optional ones, with a series of questions.
2013-09-06 09:16:46 +02:00
Thomas Haller
2766829a67 libnm-glib: don't warn when dbus object initialization fails with UNKNOWN_METHOD
A common case where this warning was triggered, was the removal of
IP6Config objects. As this can happen as a regular event, do not warn in
this case.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-05 22:08:43 +02:00
Dan Williams
fa0112c0ca core: handle externally added IPv6 adresses and routes on IP change
Cache externally added IP details and represent them via the D-Bus
interface, and also merge them into the final device config to ensure
they aren't lost if DHCP renews or RA changes occur.
2013-09-05 14:24:06 -05:00
Dan Williams
d8c9828a4d core: add nm_ip6_config_subtract()
Removes anything in 'src' from 'dst'.
2013-09-05 14:24:06 -05:00
Scott Shambarger
04f6e09d50 ifcfg-rh: fix handling of legacy IPv4 route files without gateway.
Routes without gateway are legal and should be treated as a device route
(direct route).

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

The original patch was written by Scott Shambarger <scott-gnome@shambarger.net>.
This is a modified version of the patch.

Signed-off-by: Thomas Haller <thaller@redhat.com>
Reported-by: Scott Shambarger <scott-gnome@shambarger.net>
2013-09-05 21:13:15 +02:00