Commit Graph

13873 Commits

Author SHA1 Message Date
Yuri Chornoivan
06f8b577ad po: update Ukrainian (uk) translation (bgo #722130)
https://bugzilla.gnome.org/show_bug.cgi?id=722130

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-01-13 21:31:06 +01:00
Christian Kirbach
68575ee30d po: update German (de) translation (bgo #722061)
https://bugzilla.gnome.org/show_bug.cgi?id=722061

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-01-13 17:35:25 +01:00
Thomas Haller
4dd6ab8f4b libnl-util: refactor nm_utils_ip4_prefix_to_netmask/netmask_to_prefix
- use a more efficient implementation for prefix_to_netmask
- fix netmask_to_prefix to behave consistently in case of
  invalid netmask
- remove unused duplicated functions from NetworkManagerUtils.c
- add test functions

Based-on-patch-by: Pavel Šimerda <psimerda@redhat.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
Related: https://bugzilla.gnome.org/show_bug.cgi?id=721771
2014-01-10 13:34:57 -06:00
Jiří Klimeš
a6432ef4d1 cli: fix printing error on incorrect 'nmcli -f blah dev show'
Don't print extra empty lines before the error.
2014-01-10 13:21:27 +01:00
Thomas Haller
446516bcfa cli/bash-completion: trivial rename of functions
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-01-10 12:12:13 +01:00
Thomas Haller
e59be00d93 cli/bash-completion: add second level help option
Commands now support help at the second level. Add completion for it.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-01-10 12:12:13 +01:00
Thomas Haller
b4d9958b76 cli/bash-completion: only complete active connections for nmcli con down
Only complete the ids/uuids for active connections in
`nmcli connection down <type> <TAB>`.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-01-10 12:12:13 +01:00
Thomas Haller
8c659b79ed cli/bash-completion: cleanup/refactor by making functions generic
Instead of having several bash functions that return some values
via nmcli, add few functions that accept parameters.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-01-10 12:12:13 +01:00
Thomas Haller
aa931ab1f2 cli/bash-completion: fix wrong completion for nmcli device wimax
wimax does not support these arguments. This was a copy&paste error from wifi.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-01-10 12:11:43 +01:00
Thomas Haller
630a1ccbce cli/bash-completion: remove not yet implemented device type 'adsl'
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-01-10 11:10:03 +01:00
Jiří Klimeš
e44bb5e6fc cli: add 'help' for second level commands (bgo #698237) (rh #1034119)
In addition to 'nmcli connection help', you can now use:
nmcli con up help
nmcli con down help
nmcli dev wifi help
etc.

The help option can also be in the form of --help/-h, or even shortened.

https://bugzilla.gnome.org/show_bug.cgi?id=698237
https://bugzilla.redhat.com/show_bug.cgi?id=1034119
2014-01-09 10:14:03 +01:00
Piotr Drąg
a0e7926df4 po: update Polish (pl) translation (bgo #721423)
https://bugzilla.gnome.org/show_bug.cgi?id=721423

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-01-08 14:29:19 +01:00
Thomas Haller
d5626b9f41 test: adjust valgrind.suppressions for make check
Make some suppressions more generic, because they
did not match on my F20.

The previous suppression for 'fun:gobject_init_ctor'
also had a syntax error. Fix that too.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-01-08 14:29:19 +01:00
Thomas Haller
3051a908a9 cli: fix leaks for getter functions (release GValue)
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-01-08 14:29:19 +01:00
Dan Williams
90782cf023 platform: ignore errors adding IPv6 point-to-point address
For now, ignore them, as libnl does not support IPv6 PtP addresses
and returns an error.  In the future perhaps we'll want to add a host
route for the peer instead of using the point-to-point address.
2014-01-06 17:25:02 -06:00
Dan Williams
0b3fdd073e ifcfg-rh: fix handling of DHCP_SEND_HOSTNAME when no hostname is given
Move DHCP_SEND_HOSTNAME parsing out of the check for DHCP_HOSTNAME so that
users can disable NM sending the system hostname to the DHCP server when
DHCP_HOSTNAME is not defined.
2014-01-06 16:20:48 -06:00
Dan Williams
91eafe95a3 core: fix stale DHCPv6 information for dispatcher lease-change events (bgo #721002)
dhcp6_lease_change() needs to be called *after* updating the DHCP config
object to ensure that the dispatcher gets the new values.
2014-01-06 16:08:06 -06:00
Scott Shambarger
a30030b82b core: fix stale DHCPv4 information for dispatcher lease-change events (bgo #721002)
dhcp4_lease_change() needs to be called *after* updating the DHCP config
object to ensure that the dispatcher gets the new values.
2014-01-06 16:07:57 -06:00
Jan Alexander Steffens
691422a460 build: add --with-dnsmasq, to specify dnsmasq path
https://bugzilla.gnome.org/show_bug.cgi?id=700219
2014-01-03 14:51:16 -05:00
Dan Winship
c4edeb6da4 settings: fix secret-agent fallback
NMAgentManager was supposed to be trying multiple secret agents on any
error except UserCanceled, but due to a botched last-minute rewrite,
it was actually doing the reverse.
2013-12-20 14:58:04 -05:00
Dan Williams
9f00e0598a build: remove left-over BLUEZ makefile bits 2013-12-20 12:12:42 -06:00
Dan Winship
eb34d3f3ff tui: remove a workaround for a fixed libnm-glib bug 2013-12-20 11:26:45 -05:00
Dan Winship
b9f1d0b361 tui: remove spare copy of nm-gvaluearray-compat.h
nmtui had its own copy of nm-gvaluearray-compat.h, which is already
available in ../include/
2013-12-20 11:26:28 -05:00
Dan Winship
d430716495 logging: allow per-domain log level overrides (bgo #699387) 2013-12-20 10:05:40 -05:00
Dan Winship
32a12ad9a4 core: fix leak in impl_manager_get_logging
nm_logging_level_to_string() returned a const string, but
nm_logging_domains_to_string() returned a malloced one, which was
getting leaked in impl_manager_get_logging(). Fix this by making them
both malloced, and freeing as needed.
2013-12-20 10:04:11 -05:00
Thomas Haller
224e698904 logging: Use locale independent strcasecmp 2013-12-20 10:04:10 -05:00
Dan Winship
111603212c logging: ignore unrecognized domains on startup
If the command line or NetworkManager.conf mentions a non-existent
domain, just print a warning and ignore it. That way if you switch to
using an older NM that doesn't have that domain, it will still work.
2013-12-20 10:04:10 -05:00
Dan Winship
fc2a14d0f9 logging: allow per-domain log level overrides
Allow specifying log domains like "DEFAULT,WIFI:DEBUG" to override the
log level on a per-domain basis.
2013-12-20 10:04:10 -05:00
Dan Winship
0e3432fbea logging: tweak logging-enabled functions
Rather than having separate nm_logging_level_enabled() and
nm_logging_domain_enabled(), have just nm_logging_enabled() that
checks both.
2013-12-20 09:57:13 -05:00
Dan Winship
bfcf402525 dns-manager: fix build without libsoup 2013-12-20 09:56:19 -05:00
Dan Winship
62fd027950 dns-manager: don't add "public suffix" domains to search (rh #851521) 2013-12-20 09:31:05 -05:00
Dan Winship
dfe194eea6 dns-manager: don't add "public suffix" domains to search (rh #851521)
If the hostname is "foo.example.com" then we want to add
"search example.com" to resolv.conf, but if it's just "example.com",
we don't want to add "search com" (rh #812394).

So if NetworkManager is being built with recent libsoup, use
soup_tld_domain_is_public_suffix() to double-check the domain before
adding it. (If it is not being built with libsoup, or is being built
with too old a version, we just skip that test, keeping the old
behavior.)
2013-12-20 09:31:04 -05:00
Dan Winship
7d126290c4 dns-manager: initialize hostname
NMPolicy only updates the NMDnsManager's hostname when it changes,
which previously did not include at startup. Meaning if your hostname
never changed, NMDnsManager would never learn it (and so would never
add an appropriate "search" line to resolv.conf). Fix that.
2013-12-20 09:31:04 -05:00
Dan Winship
ea7eb5ab5e dns-manager: make non-refcounted.
All the cool singletons are doing it.

Also, get rid of excess nm_dns_manager_get() calls in nm-policy.c; it
already has priv->dns_manager.
2013-12-20 09:31:04 -05:00
Dan Winship
a201b608dd devices: don't try to capture resolv.conf if not managing it (rh #1035861) 2013-12-20 09:29:34 -05:00
Dan Winship
f2413ae498 devices: don't try to capture resolv.conf if not managing it (rh #1035861)
If NM is not explicitly managing resolv.conf (either due to the "dns"
NetworkManager.conf setting, or because resolv.conf is immutable),
then don't try to parse nameservers out of it when capturing a
connection, since there's no reason to believe that the name servers
there are related to any particular connection.
2013-12-20 09:28:01 -05:00
Dan Winship
20b43802e8 dns-manager: Don't try to manage immutable /etc/resolv.conf
If /etc/resolv.conf has the immutable flag set, then behave as though
"dns=none" was specified (rather than repeatedly trying and failing to
update it).
2013-12-20 09:28:01 -05:00
Dan Winship
3205661096 dns-manager: add nm_dns_manager_get_resolv_conf_mode()
Add a property indicating whether NMDnsManager is ignoring
resolv.conf, managing it by explicitly putting nameservers into it, or
managing it by proxying to another service (eg, dnsmasq) with
"nameserver 127.0.0.1".
2013-12-20 09:28:01 -05:00
Dan Winship
69f92cfa2c core: when suspending, don't take down virtual devices (rh #1038158)
NM bounces devices on suspend/resume, since some buggy drivers require
it. However, there's no need to take down virtual devices. (In
particular, we don't want to take down libvirt's virbr0, since it
won't get automatically brought back up afterward.)
2013-12-20 09:16:43 -05:00
Jiří Klimeš
6b3c209d9a Merge: add MTU property, change 'nmcli dev show' default format (rh #998003) 2013-12-20 11:54:24 +01:00
Jiří Klimeš
3668fd7cbc cli: display MTU for devices 2013-12-20 11:37:54 +01:00
Jiří Klimeš
17a7763d81 libnm-glib: add 'mtu' property to NMDevice 2013-12-20 11:37:54 +01:00
Jiří Klimeš
44bd2275e7 device: add 'mtu' property 2013-12-20 11:37:54 +01:00
Jiří Klimeš
e3bd575758 cli: simplify getting device hardware addresses 2013-12-20 11:37:54 +01:00
Jiří Klimeš
567cfa41f4 libnm-glib: add nm_device_get_hw_address() to NMDevice
It simplifies code getting MAC addresses for clients.
2013-12-20 11:37:54 +01:00
Jiří Klimeš
f889440b96 cli: more compact format for device info (nmcli device show) (rh #998003)
https://bugzilla.redhat.com/show_bug.cgi?id=998003
2013-12-20 11:37:54 +01:00
Dan Williams
f4f20ca0bc rdisc: ensure RDNSS and DNSSL lifetimes are updated (rh #1044757) (bgo #720760)
NetworkManager was not correctly updating the DNSSL/RDNSS option timestamps
when new Router Advertisements were received, leading to a router solicitation
loop after 1/2 the lifetime of the DNSSL/RDNSS option.
2013-12-19 18:03:28 -06:00
Dan Williams
b705d7f50e rdisc: don't add new RDNSS and DNSSL options with zero lifetime
A lifetime of 0 means that the domain or server should no longer
be used, so if we get an RA with a zero-lifetime DNS server or
domain that we haven't seen before, don't bother adding it to the
list.

DNS servers and domains that are already known and become zero
lifetime in the next RA are already correctly handled by
clean_dns_servers() and clean_domains().
2013-12-19 14:39:36 -06:00
Dan Williams
3f654dc6e6 rdisc: ensure RDNSS and DNSSL lifetimes are updated (rh #1044757) (bgo #720760)
The DNS server and domain timestamps and lifetimes weren't updated
when a new RA was received. When half the lifetime for either of
them had passed, clean_dns_servers() and clean_domains() request a
Router Solicitation to ensure the DNS information does not expire.

This obviously results in a new Router Advertisement, but since the
timestamps don't get updated, clean_dns_servers() and clean_domains()
simply request another solicitation because 'now' is still greater
than half the old lifetime.  This casues another solicit request,
which causes another RA, which... etc.

https://bugzilla.redhat.com/show_bug.cgi?id=1044757
https://bugzilla.gnome.org/show_bug.cgi?id=720760
2013-12-19 14:39:36 -06:00
Dan Williams
773d4e4dc8 rdisc: don't leak DNSSL domains if they aren't added
If the new DNSSL domain was not used, becuase it was already in the
list, the domain string would be leaked.
2013-12-19 14:39:36 -06:00