Commit Graph

15047 Commits

Author SHA1 Message Date
Thomas Haller
9a1e0b97da shared: add _nm_packed macro for __attribute__((packed)) 2016-04-11 11:26:36 +02:00
Thomas Haller
966fcdba1b ip6-config: use nm_utils_ip6_address_same_prefix().
Instead of same_prefix() in nm_ip6_config_destination_is_direct(),
use nm_utils_ip6_address_same_prefix().
2016-04-11 11:26:36 +02:00
Thomas Haller
db3175d9c0 core: add nm_utils_ip6_address_same_prefix() util 2016-04-11 11:26:36 +02:00
Thomas Haller
a18fca36a5 dnsmasq/tests: make use of nmtst util to initialize NMPlatformIP4Address 2016-04-11 11:26:36 +02:00
Thomas Haller
b3daf156de ip-config/tests: refactor tests to use utilities from "nm-test-utils.h" 2016-04-11 11:26:36 +02:00
Thomas Haller
2e6ec6d8ac nmtst: add nmtst_platform_ip4_address() util 2016-04-11 11:26:32 +02:00
Thomas Haller
0e78ce5ed6 nmtst: add nmtst_rand_buf() util 2016-04-11 11:22:50 +02:00
Thomas Haller
fbfe2ef216 core/utils: add NM_UTILS_LOOKUP_ITEM_IGNORE_OTHER() switch case
NM_UTILS_LOOKUP_DEFAULT_NM_ASSERT() is useful because unless
compiled with NM_MORE_ASSERTS, there is no assertion.
An assertion includes the function name, and can make the
function ineligible for inlining.
2016-04-11 11:22:50 +02:00
Thomas Haller
c328cf52f2 dnsmasq: fix using '%' delimiter to scope link local with zone-id
Since long, dnsmasq supports scoping the IPv6 address
with '@<interface-name>'. Since 2.58, it also supports
'%' as delimiter, which is the standard way to specify
the zone-id (rfc6874).

Since 2.73, specifying the scope with '@' as "server"
address is no longer working properly, thus breaking
NetworkManager with dnsmasq >= 2.73.

To work around that, use '%' delimiter. That breaks pre-2.58
users that have a DNS server on a link local address, but that
seems acceptable as that version was released in January 2012.

https://bugzilla.gnome.org/show_bug.cgi?id=764839
2016-04-11 11:13:17 +02:00
Beniamino Galvani
adb534518b device: merge branch 'bg/dhcp-assumed-generated-route-rh1265239'
https://bugzilla.redhat.com/show_bug.cgi?id=1265239
2016-04-08 21:31:08 +02:00
Beniamino Galvani
9b7f9af077 device: take care of default route of DHCP generated-assumed connections
In general we don't touch the externally set default route on devices
that use a generated-assumed connection. When the IP method is AUTO
(or DHCP), this means that we are not able to restore the default
route after a temporary expiration of the lease which removes
addresses/routes from the device.

Change this, and let NM update the default route for generated-assumed
devices using dynamic addressing.

https://bugzilla.redhat.com/show_bug.cgi?id=1265239
2016-04-08 21:28:57 +02:00
Beniamino Galvani
c84fd50287 device: don't update applied connection for generated assumed devices
The applied connection must describe the configuration that was
initially activated on the device. Even if the IP configuration
changes, we shouldn't reset the applied connection for devices using a
generated-assumed connection, otherwise we would lose information on
the IP method we're trying on the device.
2016-04-08 21:28:57 +02:00
Lubomir Rintel
ca97d66af3 merge: branch 'lr/man' 2016-04-08 13:10:54 +02:00
Lubomir Rintel
b349603959 man: clarify the license of the manuals
It's included from GFDL 1.1+ document; it should be GFDL too.
2016-04-08 13:10:47 +02:00
Lubomir Rintel
530af7009e man: don't template NetworkManager.conf.xml
Use XML entities instead.
2016-04-08 13:10:47 +02:00
Lubomir Rintel
22fb039435 man: remove work-in-progress warning 2016-04-08 13:10:47 +02:00
Lubomir Rintel
f73649db5c man: fix prompt and user input formatting 2016-04-08 13:10:47 +02:00
Lubomir Rintel
37271b6827 man: fix nmcli-examples synopsis formatting 2016-04-08 13:10:47 +02:00
Lubomir Rintel
2a28bb4d04 docs: toplevel document nitpicks 2016-04-08 13:10:47 +02:00
Lubomir Rintel
3be4c94446 docs: don't set the online-location attribute
It causes the links to be based on a latest online version rather than
on the current one.
2016-04-08 13:10:47 +02:00
Thomas Haller
2e34d34cf0 device: let managed by user-udev overwrite external-down
An externally configured software device is considered external-down until
it is IF_UP and has IP configuration.

When the user explicitly manages the device via UDEV rule, that decision
should overrule external-down.
2016-04-08 11:37:38 +02:00
Thomas Haller
4a8a294fe1 ppp-manager: refactor create temporary ppp setting in nm_ppp_manager_start() 2016-04-08 11:16:53 +02:00
Beniamino Galvani
76309ebe79 ppp-manager: don't modify the applied connection
The applied connection must not be modified during the activation. If
the PPP setting needs to be changed when activating a PPPoE
connection, make a copy to prevent the following error:

 could not get secrets:
 GDBus.Error:org.freedesktop.NetworkManager.Settings.Failed:
 The connection was modified since activation

https://bugzilla.redhat.com/show_bug.cgi?id=1324895
2016-04-08 11:08:54 +02:00
Thomas Haller
8f8bf0d315 config/tests: avoid test failure for valgrind due to g_file_copy()
Valgrind doesn't like it, so don't use g_file_copy().

  ==10410== Syscall param ioctl(generic) points to unaddressable byte(s)
  ==10410==    at 0x82E1707: ioctl (syscall-template.S:84)
  ==10410==    by 0x7712E71: btrfs_reflink_with_progress (gfile.c:3012)
  ==10410==    by 0x7712E71: file_copy_fallback (gfile.c:3186)
  ==10410==    by 0x7712E71: g_file_copy (gfile.c:3394)
  ==10410==    by 0x1350CA: test_config_state_file (test-config.c:948)
  ==10410==    by 0x7D0845A: test_case_run (gtestutils.c:2158)
  ==10410==    by 0x7D0845A: g_test_run_suite_internal (gtestutils.c:2241)
  ==10410==    by 0x7D08622: g_test_run_suite_internal (gtestutils.c:2253)
  ==10410==    by 0x7D0882D: g_test_run_suite (gtestutils.c:2328)
  ==10410==    by 0x7D08850: g_test_run (gtestutils.c:1596)
  ==10410==    by 0x12EFA4: main (test-config.c:1032)
  ==10410==  Address 0x9 is not stack'd, malloc'd or (recently) free'd
  ==10410==

Fixes: e3a30665d7
2016-04-08 10:46:33 +02:00
Thomas Haller
d0836be0eb core: rename nm_config_run_state* to nm_config_state*
After all, this state is stored persistently to /var/lib/NetworkManager,
and not to volatile storage in /var/run. Hence the name is better.
It's also shorter, so rename it.

The commit is mostly trivial, including update of code comments
and logging messages.

Fixes: 1b43c880ba
2016-04-07 18:52:12 +02:00
Beniamino Galvani
e3a30665d7 config: test reading and writing of state file 2016-04-07 17:57:25 +02:00
Beniamino Galvani
69955694a7 core: add code coverage support for files in src/ 2016-04-07 17:57:25 +02:00
Rafael Fontenelle
2a485060c9 po: update Brazilian Portuguese (pt_BR) translation (bgo#764690)
https://bugzilla.gnome.org/show_bug.cgi?id=764690
2016-04-07 16:27:59 +02:00
Thomas Haller
1b43c880ba config: let NMConfig handle "NetworkManager.state" file (bgo#764474)
Move reading and writing of the state file to NMConfig
("/var/lib/NetworkManager/NetworkManager.state" file).

Originally, I intended to persist more state, thus it made
sense to cleanup handling of the state file and move it all
at one place. Now, it's not clear that will happen anytime soon.

Still, the change is a worthy cleanup, so do it anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=764474
2016-04-07 10:15:01 +02:00
Lubomir Rintel
350d96a9ee release: bump version to 1.3.0 (development) 2016-04-05 22:22:58 +02:00
Lubomir Rintel
f4b4e35c79 release: add version 1.4 macros 2016-04-05 22:22:58 +02:00
Thomas Haller
9152dec99f build: disable deprecation checks for internal compilation
For internal compilation we want to be able to use deprecated
API without warnings.

Define the version min/max macros to effectively disable deprecation
warnings.

However, don't do it via CFLAGS option in the makefiles, instead hack it
to "nm-default.h". After all, *every* source file that is for internal
compilation needs to include this header as first.
2016-04-05 22:22:58 +02:00
Lubomir Rintel
29cfb144a8 man: gitignore man7 2016-04-05 20:30:43 +02:00
Colin Walters
c976f983eb build: make man page hardlinks conditional on having man pages
Otherwise we fail since they don't exist.  We have to carefully
implement an "or" condition for the cases of having prebuilt manpages
in a tarball, vs actually building them from source.
2016-04-05 18:15:38 +02:00
Lubomir Rintel
9a68f12737 po: update Slovak translation 2016-04-05 15:29:11 +02:00
Lubomir Rintel
b0862e759a po: fix line terminations
Seems like Zanata makes it easy to make this mistake if it's just a
warning.

Turn the string back to fuzzy if unsure.
2016-04-05 14:58:33 +02:00
Lubomir Rintel
cc8016073b merge: branch 'lr/docbook'
Various documentation improvements.
2016-04-05 14:38:11 +02:00
Lubomir Rintel
a8e8e76641 dbus: fix up the XML formatting
The conversion script didn't do a very good job. It got fired.
2016-04-05 14:37:51 +02:00
Lubomir Rintel
015c061a16 dbus: correct the NMDevice::StateReason type 2016-04-05 14:37:51 +02:00
Lubomir Rintel
2ae34aef9f dbus: correct the links to types
gdbus-codegen is not smart enough to understand #Type, include raw
docbook directly.
2016-04-05 14:37:51 +02:00
Lubomir Rintel
4e8fdb20d1 Revert "dbus: tool to convert documentation annotations"
Not needed anymore.
2016-04-05 14:37:51 +02:00
Lubomir Rintel
6e2b188361 dbus: convert the annotations to gtk-doc blocks 2016-04-05 14:37:51 +02:00
Lubomir Rintel
5c5fd96d2b dbus: tool to convert documentation annotations 2016-04-05 14:37:51 +02:00
Lubomir Rintel
2c3c83370b dbus: move NMWimaxNspNetworkType to nm-dbus-interface.h
It's an enum used on D-Bus.
2016-04-05 14:37:51 +02:00
Lubomir Rintel
ccf1d5bd94 dbus: remove the telepathy annotations
We now generate documentation with gdbus-codegen and these are now
useless.
2016-04-05 14:37:51 +02:00
Lubomir Rintel
0fc0cc68fc man: move nmcli-examples to section 7
It really is not a configuration file and doesn't belong to section 5.
2016-04-05 14:37:51 +02:00
Lubomir Rintel
20300fd7db man: make the templated manuals a bit more consistent with the rest
Use the docbook tags wherever appropriate.
2016-04-05 14:37:51 +02:00
Lubomir Rintel
60582bf443 man: include version from a XML entity
This way it's consistently used across all manual page without a need
for XSL templating.

Also, the entities file could in future possibly be used to template the
build-time configurables such as filesystem paths or bug tracker URL.
2016-04-05 14:37:51 +02:00
Lubomir Rintel
8035b5b03b man: drop dates
It's injected from the makefile, but not even used consistently or included in
the resulting render of manual page. Which is good, otherwise we'd have a
non-reproducible build with possible multilib conflicts if rendered around
midnight.
2016-04-05 14:37:50 +02:00
Lubomir Rintel
5a4c54c793 man: rename some variables
No functional change, just a readability improvement. No need to prefix
the variables with docbook_ and docbook_generated -- all manual pages
are generated from docbook.
2016-04-05 14:37:50 +02:00