Commit graph

15906 commits

Author SHA1 Message Date
Thomas Haller
eab8b06d8b ifcfg-rh/tests: merge test-ifcfg-rh-utils into test-ifcfg-rh
We don't need need separate unit tests for basic tests that can
just run in the same test-run. If you really need to run only
a particular set of tests, try
  ./src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh -p /settings/plugins/ifcfg-rh/utils

Results in less compilation (time), and less binaries to test during
`make check`.
2016-10-11 11:37:46 +02:00
Thomas Haller
254f892c9c ifcfg-rh: rename files 2016-10-11 11:37:46 +02:00
Thomas Haller
d18e71f35a ibft/build: cleanup Makefile.am to build one core library from ibft plugin
Instead of having the tests re-compile "nms-ibft-reader.c".
2016-10-11 11:37:46 +02:00
Thomas Haller
68f33a846e ibft: rename function names for ibft plugin 2016-10-11 11:37:46 +02:00
Thomas Haller
912526f543 ibft: rename files to "nms-ibft-*" 2016-10-11 11:37:46 +02:00
Thomas Haller
33d05f5295 keyfile/build: set LDFLAGS for buiding keyfile tests 2016-10-11 11:37:46 +02:00
Thomas Haller
9ff1fa4ae1 shared: add NM_DECIMAL_STR_MAX() macro 2016-10-11 11:37:46 +02:00
Thomas Haller
c5f4e36fd9 shared: assert against buffer length in nm_sprintf_buf() 2016-10-11 11:37:46 +02:00
Thomas Haller
ed93c168cf logging,config: merge branch 'th/logging-alloc-bgo772516'
https://bugzilla.gnome.org/show_bug.cgi?id=772516
2016-10-11 11:29:58 +02:00
Thomas Haller
78d34d7c2e config: fix printing default values for missing sections
Previously, the default values were only printed if the corresponding
section was already present. Fix that.

Also, we call nm_config_data_log() also to dump the configuration
into the logfile. In that case (!stream), exclude the default values.
2016-10-11 11:29:52 +02:00
Thomas Haller
8bca7704c9 config: print default value for logging.audit 2016-10-11 11:29:52 +02:00
Thomas Haller
64e02a0ac7 logging: protect VPN_PLUGIN logging domain
VPN_PLUGIN is special. With
  # nmcli general logging level TRACE domains ALL
the logging verbosity of VPN_PLUGIN domain should not be set higher then
info. The user has to explicitly set it via:
  # nmcli general logging level TRACE domains ALL,VPN_PLUGIN:TRACE

This was not the case for
  # nmcli general logging level TRACE

Fix that.
2016-10-11 11:29:52 +02:00
Thomas Haller
64951f07fb logging: remove LOGD_HW alias for LOGD_PLATFORM
Since commit 1495853e01, LOGD_HW is renamed to
LOGD_PLATFORM. Remove the internal usage of the deprecated name.
2016-10-11 11:29:52 +02:00
Thomas Haller
f43b21b71d logging: avoid some heap allocations constructing journal logging data 2016-10-11 11:29:52 +02:00
Thomas Haller
7f478f86ca logging: avoid copy of logging message fo syslog and glib logging backend
As both syslog() and g_log() accept a format string, we should not
create fullmsg ahead. This saves an additional clone of the message.
2016-10-11 11:29:52 +02:00
Lubomir Rintel
1c0e9ae7d6 logging: fix a warning when built without journald
nm-logging.c:213:1: error: ‘syslog_identifier_full’ defined but not used [-Werror=unused-function]
 syslog_identifier_full (const struct Global *gl)
 ^

Fixes: fd12aa1b20
2016-10-11 10:42:22 +02:00
Lubomir Rintel
5d155987dc dispatcher: add the proxy parameters
Fixes: 86d4573baa
2016-10-11 10:36:15 +02:00
Lubomir Rintel
bcb685c4cb config: allow fallback to fake permanent address for default wired connections
The default wired connection is already generated allowing the use of a fake
address, but for the state file and the device matching specs only non-fake
addresses are used. Let's allow fake addresses consistently, so that default
wired connections work properly in containers (where the veth address is
considered fake) as well.

Also, it would really be a better idea to use ifnames everywhere instead, but
that would change the format of the state file.
2016-10-11 10:36:15 +02:00
Lubomir Rintel
afe123c3a1 ethernet: don't assert there's the udev device for an ethernet device
We could be running in a container.
2016-10-11 10:36:15 +02:00
Lubomir Rintel
15a26d6192 platform/tests: skip root tests when we can't mount /sys/devices 2016-10-11 10:36:15 +02:00
Lubomir Rintel
790e23df67 build: fix required packages list 2016-10-10 18:51:23 +02:00
Dan Williams
b39869750c wifi: clean up clearing a pending scan
All callers of request_wireless_scan() cleared the periodic scan
source immediately before calling the function, so just move that
into request_wireless_scan().  The only one that doesn't clear
it is request_wireless_scan_periodic() but that sets the source
id to 0 already, so the clear has no effect.

https://mail.gnome.org/archives/networkmanager-list/2016-October/msg00012.html
2016-10-08 10:23:22 +02:00
Thomas Haller
8b1d569e91 gitignore: ignore test-wifi-ap-utils
Although the test "test-wifi-ap-utils" got already renamed to "test-general",
keep ignoring the old binary when switching between branches.
2016-10-08 10:19:10 +02:00
Dan Williams
6126c32e6b wwan/ppp: send explicit port speed to pppd when port speed is zero (rh #1281731)
Some TTY drivers or devices appear to ignore port speed and always
report zero.  Technically this means the port is hung up and control
lines should be disconnected, but with USB devices many of the serial
port attributes are meaningless and ignored by some devices.

pppd requires the port's speed to be greater than zero, and will
exit immediately when that is not the case, even though these
modems will work fine.  Passing an explicit speed to pppd in this
case works around the issue, as pppd attempts to set that speed
on the port and doesn't actually care if that operation fails.

https://bugzilla.redhat.com/show_bug.cgi?id=1281731
2016-10-07 14:54:27 -05:00
Thomas Haller
3ceaef90fe core: remove unnecessary includes to netlink/route library
We no longer use libnl-route-3 library in NetworkManager. Remove the
unnecessary includes.
2016-10-07 21:37:17 +02:00
Thomas Haller
1213a47faf po: fix POTFILES.in after renaming "nm-wifi-ap-utils.c"
Fixes: 44b2044faa
2016-10-06 21:01:53 +02:00
Thomas Haller
1232b09536 keyfile: merge branch 'th/keyfile-rename-bgo772463'
https://bugzilla.gnome.org/show_bug.cgi?id=772463
2016-10-06 20:41:38 +02:00
Thomas Haller
1bea5d5048 keyfile: add logging macros to keyfile plugin 2016-10-06 20:41:20 +02:00
Thomas Haller
34f65e6ef8 keyfile: fix calling parent implementation in NMSKeyfilePlugin:constructed() 2016-10-06 20:41:20 +02:00
Thomas Haller
4d194c3833 keyfile/build: don't build keyfile settings plugin as library
We directly include keyfile sources in NetworkManager by compiling
them into "libNetworkManager.la".

Drop unused libraries from the Makefile.
2016-10-06 20:41:20 +02:00
Thomas Haller
8b1411712a keyfile: refactor GObject type creation 2016-10-06 20:41:20 +02:00
Thomas Haller
5d80a8a78b keyfile: rename public keyfile functions and names 2016-10-06 20:41:20 +02:00
Thomas Haller
93c8381965 keyfile: rename files
Setting plugins should have their own name prefix (nms) and
keyfile should have as prefix "nms-kf". As a first step, rename
the files.
2016-10-06 20:41:20 +02:00
Thomas Haller
a63867a40b build: use NetworkManager logging domain for device and settings plugins
First of all, G_LOG_DOMAIN only matters when using g_log() directly.
Inside core, we always want to log via nm-logging. Every call to a
g_log() is a bug in the first place (like a failed assertion that logs
a g_critical() during g_return_if_fail()).

So, for all practic purposes, the logging domain is not used.

For nm-logging, the G_LOG_DOMAIN has no effect. Unless we find a proper
use of this domain, G_LOG_DOMAIN should not differ from what the rest of
core.
2016-10-06 20:41:20 +02:00
Thomas Haller
fbaba4c1c3 wifi: merge branch 'th/wifi-rename' 2016-10-06 20:40:18 +02:00
Thomas Haller
ac1c353196 wifi: move code in nm-wifi-ap.c around and minor cleanup 2016-10-06 20:37:04 +02:00
Thomas Haller
44b2044faa wifi: rename NMAccessPoint to NMWifiAP
NMAccessPoint was in file "nm-wifi-ap.h" with
method nm_ap_*(). Make the naming consistent.

Also rename "nm-wifi-ap-utils.*" as it contains general
purpose wifi utilities. No need to have special "ap" utilities.

Same for "test-wifi-ap-utils.c". It just contains general wifi
tests.
2016-10-06 20:35:05 +02:00
Thomas Haller
1791978007 iface-helper: merge branch 'th/iface-helper-logging-bgo772456'
https://bugzilla.gnome.org/show_bug.cgi?id=772456
2016-10-06 13:34:23 +02:00
Thomas Haller
2b728c7dda iface-helper: use different syslog-identfier for nm-iface-helper 2016-10-06 13:31:34 +02:00
Thomas Haller
fd12aa1b20 logging: allow setting the syslog-identifier not to use G_LOG_DOMAIN
For nm-iface-helper we want to use a different syslog-identifier then
"NetworkManager".

Since we build "nm-logging.c" as part of libNetworkManagerBase.la,
it would be cumbersome to compile the logging part multiple times
with different -DG_LOG_DOMAIN settings.

Instead, allow configuring at runtime.
2016-10-06 13:31:34 +02:00
Thomas Haller
921f6a9c34 iface-helper: pass on the logging level to nm-iface-helper 2016-10-06 13:31:34 +02:00
Thomas Haller
1098abe8c8 iface-helper: set logging prefix 2016-10-06 13:31:34 +02:00
Thomas Haller
06b3b06a95 logging: support system-wide prefix
Will be used by nm-iface-helper.
2016-10-05 15:34:45 +02:00
Thomas Haller
bedb19840f iface-helper: use logging macros 2016-10-05 15:34:45 +02:00
Thomas Haller
918f33cde8 iface-helper: free main_loop instance at end of main() 2016-10-05 15:10:34 +02:00
Thomas Haller
d8724ab4f5 iface-helper: return from main() instead of calling exit() 2016-10-05 15:07:48 +02:00
Thomas Haller
852a52a4fc iface-helper: namespace global variables 2016-10-05 15:05:50 +02:00
Thomas Haller
67405bd5bc proxy: merge branch 'th/proxy-cleanup' 2016-10-05 15:03:09 +02:00
Thomas Haller
8bc8d343ca ifcfg-rh/proxy: fix memleak in make_proxy_setting() 2016-10-05 14:58:03 +02:00
Thomas Haller
8b51e345af libnm/proxy: add proxy setting for non-slave connection during normalization
And reject slave settings with proxies.
2016-10-05 14:53:21 +02:00