Commit Graph

15047 Commits

Author SHA1 Message Date
Jiří Klimeš
7211d82f77 examples: use correct Mbit/s for bitrates 2014-04-01 15:15:18 +02:00
Jiří Klimeš
c1e5493117 nmcli: use correct Mbit/s units for maximal bitrate (rh #1080474)
https://bugzilla.redhat.com/show_bug.cgi?id=1080474
2014-04-01 15:15:17 +02:00
Jiří Klimeš
759236681c trivial: make clear the maximum bitrate is in kbit/s 2014-04-01 15:15:09 +02:00
Dan Williams
1bf2ffb61e core: ensure activation does not disconnect private connections
If two users had the ability to control networking, and user1 started
a private connection which user2 cannot see, user2 could start their
own connection and disconnect user1's connection.  This is not
consistent with device disconnection.  A user who cannot see a
connection should not be able to start/stop it, even if they are
allowed to control networking in general.
2014-03-31 18:02:11 -05:00
Jiří Klimeš
4209f170da nmcli: fix an error when showing progress of activation in editor
(process:7213): CRITICAL **: nm_active_connectiuon_get_state: assertion `NM_IS_ACTIVE_CONNECTION (connection)' failed
2014-03-31 18:10:55 +02:00
Jiří Klimeš
a2597c0816 ifcfg-rh: put \n after hostname when writing it to /etc/hostname 2014-03-31 17:44:19 +02:00
Jiří Klimeš
da354830da core: build with SELinux; don't break /etc/hostname context (rh #1070829)
https://bugzilla.redhat.com/show_bug.cgi?id=1070829
2014-03-31 17:44:15 +02:00
Jiří Klimeš
0d1bdffe91 Merge fixes for nm-online (rh #rh1054364)
https://bugzilla.redhat.com/show_bug.cgi?id=1054364
2014-03-31 08:44:20 +02:00
Thomas Haller
0a85bff70a nm-online: fix considering the --quiet option
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-03-31 08:37:10 +02:00
Jiří Klimeš
ea962ce411 trivial: correct nm-online's '--exit' option description 2014-03-31 08:37:10 +02:00
Jiří Klimeš
520d2814ba systemd: update NetworkManager-wait-online.service to wait for startup 2014-03-31 08:37:10 +02:00
Jiří Klimeš
20fb078dd6 nm-online: fix nm-online to report online status correctly (rh #1054364)
This fixes a behaviour change made by 44ac1020da.
That commit make nm-online to wait for NM finishing startup instead of waiting
for a real connection. So for NetworkManager fully initialized, but
disconnected nm-online would return 0.

$ nmcli -f RUNNING,STATE,STARTUP,CONNECTIVITY gen status
RUNNING  STATE         STARTUP  CONNECTIVITY
running  disconnected  started  none

Revert back to the original behaviour of waiting for a connection. And
introduce a new option '--wait-for-startup' waiting for NetworkManager
finishing its startup, which is useful in some cases, like
NetworkManager-wait-online.service.

https://bugzilla.redhat.com/show_bug.cgi?id=1054364
2014-03-31 08:37:10 +02:00
Yuri Chornoivan
254d9a4850 po: updated Ukranian translation (bgo #727033) 2014-03-28 17:15:32 -05:00
Dan Winship
acb6a0d305 core: update NMManager:devices before emitting notify::devices (rh #1078720)
NMClient's "devices" property was getting out of sync because the
daemon was emitting "notify" before actually changing the property
value. This resulted in problems with re-activating virtual devices
that had previously been deactivated in gnome-control-center and
anaconda. (And probably gnome-shell and nm-applet?)
2014-03-27 12:16:46 -04:00
Dan Winship
4dba720d8c platform: fix handling of labels
If an address has a label without a ':' in it (eg, its label is just
$DEVICE, not $DEVICE:$NUM), then ignore it.
2014-03-26 12:56:57 -04:00
Dan Winship
726e84cfbf devices: if a generated connection doesn't verify, log why 2014-03-26 12:56:57 -04:00
Dan Winship
cfba0f8693 ifcfg-rh: add support for ifcfg alias files (rh #1067170) 2014-03-26 10:57:20 -04:00
Dan Winship
12d3a7908e keyfile: ignore ipv4.address-labels
For now they are only supported by ifcfg-rh
2014-03-26 10:53:59 -04:00
Dan Winship
73e011d0b6 ifcfg-rh: add support for reading and writing ifcfg alias files 2014-03-26 10:53:59 -04:00
Dan Winship
8fbd56258a core: handle IPv4 address labels
Handle address labels when applying or capturing an
NMSettingIP4Config.
2014-03-26 10:39:37 -04:00
Dan Winship
bc43d532ee platform: support address labels for IPv4 addresses 2014-03-26 10:39:37 -04:00
Dan Winship
e0832bdb79 libnm-util: add (private API) support for address labels to NMSettingIP4Config 2014-03-26 10:39:36 -04:00
Dan Winship
6f61b3b934 libnm-util: add nm-util-private.h header with nm_util_get_private() 2014-03-26 10:39:36 -04:00
Dan Williams
f27c01453a dcb: fix testcases for disabling DCB with short-format command
Late-fixup for review comments and I didn't run 'make check'.  Bad me.
2014-03-26 09:21:46 -05:00
Dan Williams
50237b95ef wifi: fixup for "wifi: support locking connections to a band (5GHz or 2GHz) (bgo #627571)"
The new freq_list option must pass configuration verification.
2014-03-26 09:19:41 -05:00
Dan Williams
66e2cdcc68 dcb: workarounds for lldpad/drivers and some bug fixes (rh #799241) 2014-03-25 22:47:13 -05:00
Dan Williams
ebc06a0015 dcb: turn off all DCB features when disabling DCB
Don't just disable DCB, but turn off the features too.
2014-03-25 22:46:59 -05:00
Dan Williams
32670b5264 dcb: ignore fcoeadm success errors like "Connection already created"
$ /usr/sbin/fcoeadm -m fabric -c enp3s0f0
fcoeadm: Connection already created on interface enp3s0f0
Try 'fcoeadm --help' for more information.
$ echo $?
3
$

Also now log error output of failed commands instead of only when
debug logging is enabled.
2014-03-25 22:46:59 -05:00
Dan Williams
4515099a3e dcb: clean up FCoE too 2014-03-25 22:46:59 -05:00
Dan Williams
95d199e04b dcb: fix memory leak 2014-03-25 22:46:59 -05:00
Dan Williams
5233e6b913 dcb: set all Priority Group options at the same time (rh #799241)
First, lldpad doesn't support disabling priority groups (e:0)
without specifying a complete priority group config (which wouldn't
be used anyway, since you're turning it off!).  While this bug is
being fixed upstream, we'll just ignore errors turning off
PG, since if you're using DCB on an interface, you probably want
to use it all the time.

Second, lldpad really wants all PG options on the same configuration
line, not split apart, because it validates the complete package
of options before applying them, regardless of whether or not they
are given in the same command.  Since NM was just emitting all the
options in separate dcbtool invocations anyway, just combine them
all into a single invocation.
2014-03-25 22:46:59 -05:00
Dan Williams
706af1aec5 wifi: support locking connections to a band (5GHz or 2GHz) (bgo #627571)
https://bugzilla.gnome.org/show_bug.cgi?id=627571
2014-03-25 22:42:31 -05:00
Dan Winship
370b60bcaa tui: allow cancelling "nmtui connect", make ^Z work (rh #1080059) 2014-03-25 09:54:52 -04:00
Dan Winship
ce26445b6f tui: allow ^Z to suspend the app
This way if we end up with bugs that make it otherwise impossible to
kill nmtui, you can at least ^Z and then kill it from the command
line.
2014-03-24 13:22:23 -04:00
Dan Winship
b4216ccb2d tui: allow Esc to cancel "nmtui connect" 2014-03-24 13:19:13 -04:00
Dan Winship
1bdc4ba948 tui: add nmt_newt_widget_get_realized(), realize forms properly
NmtNewtForm is an NmtNewtWidget, but previously it was only realizing
its child, not itself, which is technically wrong (though it had no
noticeable effect until get_realized() was added).
2014-03-24 13:16:12 -04:00
Dan Williams
d0c380ea68 wwan: disconnect modem signals when disposing NMDeviceModem 2014-03-21 17:54:10 -05:00
Dan Winship
f8b4ee04ba tui: add some comments to nmt-newt-form.c 2014-03-21 13:32:50 -04:00
Dan Winship
96a5ad51c2 tui: fix using Escape from main menu
We weren't checking whether the form closed because the menu was
activated or because the user hit Escape
2014-03-21 13:32:50 -04:00
Jiří Klimeš
a3de4283ea tui: fix crashes in nmtui-connect (rh #1078281)
https://bugzilla.redhat.com/show_bug.cgi?id=1078281
2014-03-21 13:32:50 -04:00
Dan Winship
f6e2b6528f tui: fix binding of some int/uint properties (rh #1078281)
GLib registers number->string value transforms (meaning that
number-valued properties like NMSettingVlan:id or NMSettingWired:mtu
get loaded into their NmtNewtEntries correctly), but not the
corresponding string->number transforms (meaning changes made in the
entries don't get propagated back to the settings, and due to
http://bugzilla.gnome.org/show_bug.cgi?id=726574, there's no warning
about this). Fix this by registering our own transforms.
2014-03-21 13:32:50 -04:00
Dan Winship
941ce35238 tui: fix quitting from "nmtui edit CONN-ID"
If you launched nmtui directly into the editor for a specific
connection, it would hang with a blank screen when you quit.

Fix this by changing the way startup works a bit, and have the created
toplevel NmtNewtForm get returned all the way to nmtui.c, which can
then connect to the "quit" signal on it and quit (rather than having
the different subprograms trying to guess whether they're supposed to
quit-on-exit or not).
2014-03-21 13:32:50 -04:00
Dan Winship
bbc6434e96 tui: fix selection bugs after deleting a connection
nmt_newt_listbox_clear() did not reset active and active_key, which in
the case of NmtEditConnectionList meant that after the connection list
was rebuilt, the selection would appear to be in the same place, but
active_key would still point to the connection that used to be in that
row, rather than the one currently in that row, so if you immediately
hit Edit or Delete, you'd get unexpected results. (It also meant that
it was possible for the selection to land on a header row instead of a
connection row.)

This was particularly bad in the case of the Delete button, since
active_key would be left pointing to a freed NMConnection in that
case.

Fix NmtNewtListbox, and then add code to NmtEditConnectionList to
preserve the selection itself when rebuilding the list.
2014-03-21 13:32:24 -04:00
Dan Winship
01f41506fb devices: send ARPs when configuring static IPv4 addresses (rh #1073447)
After applying a configuration with static IPv4 addresses, call
/sbin/arping to announce the new addresses to the host's neighbors.
(Basic idea copied from Fedora ifup-eth.)
2014-03-21 09:26:19 -04:00
Jiří Klimeš
7ff7df7640 core: improve ifname matching of existing x generated connections (rh #1077743)
DEVICE="ens3"
ONBOOT=yes
NETBOOT=yes
UUID="23466771-f5fa-4ca9-856f-eaf4a8e20c3f"
BOOTPROTO=none
IPADDR="10.0.0.2"
PREFIX="24"
GATEWAY="10.0.0.1"
HWADDR="52:54:00:12:34:56"
TYPE=Ethernet
NAME="ens3"

This ifcfg file results in connection.interface-name=ens3.
However, device-generated connection didn't set interface-name property.

Fix that by setting interface-name property when generating a connection. Also
allow matching connections if interface-name is not set in a connection.

https://bugzilla.redhat.com/show_bug.cgi?id=1077743
2014-03-21 09:24:13 +01:00
Dan Williams
e4bcfc20ca core: export ActiveConnection before handing it to the device (bgo #723783)
The AC doesn't get a D-Bus path until it's exported, but that happens after
it's handed to the Device it will be activated on.  The Device emits a
PropertyChanged event when it's handed the AC, but it ignores ACs that
aren't exported yet.  Thus when activating, the Device doesn't emit the
AC's path at all in the ActiveConnection property because it's NULL.

Fix that by exporting the AC immediately before starting activation
with it.

Second, move the notification of the Device.ActiveConnection property
to be emitted along with the state change to PREPARE instead of long
before it.  While we don't guarantee signal ordering in general, this
seems like a more correct ordering.

https://bugzilla.gnome.org/show_bug.cgi?id=723783
2014-03-20 19:26:40 -05:00
Dan Winship
398080640e core: warn if multiple plugins for the same type are installed
If we find multiple plugins for the same type (eg, because the user
previously installed the "atm" and "bt" plugins, and didn't delete
them), log a warning.
2014-03-19 14:56:47 -04:00
Dan Winship
a18248dd1b devices: rename "atm" plugin to "adsl", and "bt" to "bluetooth"
The atm/adsl plugin really is a generic ATM plugin but (a) it needs a
bit of work to do IPoATM rather than just PPPoATM and PPPoEoATM, and
(b) most people currently using NM's ATM support are using DSL devices
not actual ATM cards anyway, and have no idea what "ATM" even means.
If we add the necessary IPoATM support later we can rename the plugin
back to -atm
2014-03-19 14:56:47 -04:00
Dan Williams
73d128bbd1 core: emit PropertyChanged signal for ActiveConnection when disconnecting 2014-03-18 15:37:37 -05:00
Dan Winship
c3aa2890f5 devices: change log message when "deactivating" device on startup
nm_device_deactivate() is used when deactivating a device, but also
when initializing it when it is first managed. Rename it to
nm_device_cleanup(), and use a different log message ("preparing
device") in the NM_DEVICE_STATE_REASON_NOW_MANAGED case.
2014-03-18 16:29:04 -04:00