Commit Graph

15047 Commits

Author SHA1 Message Date
Lubomir Rintel
b1550df6f5 sd-dhcp-client: Add missing initializers
Missing initializers together with automatic cleanup seem to annoy GCC's
-Werror=maybe-uninitialized, breaking the --enable-more-warnings=error
builds.
2014-11-07 12:02:27 +01:00
Jiří Klimeš
3a551664df cli: add 'nmcli agent' command (bgo #739568)
Synopsis:
nmcli agent { secret | polkit | all }

The command runs separate NetworkManager secret agent or session polkit agent, or both.
It is useful when
- no other secret agent is available (such as GUI nm-applet, gnome-shell, KDE applet)
- no other polkit agent is available (such as polkit-gnome-authentication-agent-1,
  polkit-kde-authentication-agent-1 or lxpolkit)

https://bugzilla.gnome.org/show_bug.cgi?id=739568
2014-11-07 11:58:25 +01:00
Jiří Klimeš
cc7dc01691 merge: implement a polkit agent and use it in nmcli (bgo #739413)
The polkit agent listener code is generic and will be used by nmtui as well.

https://bugzilla.gnome.org/show_bug.cgi?id=739413
2014-11-07 11:38:31 +01:00
Jiří Klimeš
e517061203 cli: add a polkit agent support for nmcli
Example: nmcli --ask general hostname computer007
2014-11-07 11:37:42 +01:00
Jiří Klimeš
c7aaee107e configure: check whether polkit-agent-1 is available 2014-11-07 11:37:42 +01:00
Jiří Klimeš
ca5d6be99c clients: add common code for polkit agent listener
that can be used by nmcli and nmtui
2014-11-07 11:37:42 +01:00
Jiří Klimeš
847e2a405b merge: use NM secret agent in nmcli when connecting to networks (bgo #705998)
The secret agent code is shared between nmcli and nmtui.

https://bugzilla.gnome.org/show_bug.cgi?id=705998
https://bugzilla.redhat.com/show_bug.cgi?id=990111
2014-11-07 11:32:38 +01:00
Jiří Klimeš
252c8bf4ed man: document/clarify --ask option in relation to password prompting 2014-11-07 09:57:36 +01:00
Jiří Klimeš
3c9b8671fa cli: add 'passwd-file' option for 'nmcli connection up' to provide passwords
It is useful for running nmcli without --ask option, i.e. non-interactively.

Example contents of the file:
wifi.psk: s e c r e t 12345
802-1x.password:kili manjaro
802-1x.pin:987654321
2014-11-07 09:32:32 +01:00
Jiří Klimeš
de7f85bdec cli: use secret agent for getting passwords from user
--ask option has to be used, so that nmcli can be interactive.
2014-11-07 09:32:32 +01:00
Jiří Klimeš
b41cb60b45 clients: add real property name to NNSecretAgentSimpleSecret
It is necessary to identify secrets uniquely in nmcli.
2014-11-07 09:32:32 +01:00
Jiří Klimeš
801fc34d6f clients: move secret agent to common directory
The agent code will be shared by both nmtui and nmcli.
2014-11-07 09:32:24 +01:00
Dan Williams
25960c2205 merge: add an 'internal' DHCP client based on systemd's DHCP code (bgo #733384) 2014-11-06 22:42:57 -06:00
Dan Williams
d2dd3b2c90 dhcp: add systemd-based "internal" DHCP client
We must also remove -Waggregate-return from m4/compiler-warnings.m4 because systemd
uses aggregate return (correctly) in a couple cases, and we cannot keep single-level
makefiles and override aggregate-return only for the systemd sub-library.

This client currently only supports DHCPv4 because the base systemd code
does not yet fully support DHCPv6.
2014-11-06 22:42:43 -06:00
Dan Williams
3c34f1d92f dhcp: add nm_dhcp_utils_client_id_string_to_bytes()
Generic function to convert a DHCP client identifier string in either
hex form ("aa:bb:cc") or string form ("blahblah") to bytes.
2014-11-06 21:58:32 -06:00
Dan Williams
cd12e97620 dhcp: systemd DHCP code changes necessary for NM integration
Random functionality that's necessary for our use of the library.
2014-11-06 21:58:32 -06:00
Dan Williams
1b1222ffdf dhcp: make systemd DHCP code into a library
The systemd code was modified to add "#if 0 /* NM_IGNORED */"
around lines that cause problems for compilation or code that is
not actually used in the library.

An adaptation layer (nm-sd-adapt) was added for glue between
systemd functions and NetworkManager, but changes to the actual
systemd code have been kept to a minimum.

The sd_event/sd_event_source functions of systemd have been
re-implemented on top of the GLib main loop.
2014-11-06 21:58:32 -06:00
Thomas Haller
78539e5ad6 dhcp: fix compiler warning in IN_SET macro
clang warns:

    dhcp-manager/systemd-dhcp/src/libsystemd-network/sd-dhcp-client.c:120:24: error: duplicate 'const' declaration specifier [-Werror,-Wduplicate-decl-specifier]
            assert_return (IN_SET(client->state, DHCP_STATE_INIT,
                           ^
    ../src/dhcp-manager/systemd-dhcp/src/shared/macro.h:376:17: note: expanded from macro 'IN_SET'
                    const typeof(_y) _x = (x);                              \
                    ^
    ../src/dhcp-manager/systemd-dhcp/src/shared/macro.h:238:34: note: expanded from macro 'assert_return'
                    if (_unlikely_(!(expr))) {                              \
                                     ^
    ../src/dhcp-manager/systemd-dhcp/src/shared/macro.h:42:44: note: expanded from macro '_unlikely_'
    #define _unlikely_(x) (__builtin_expect(!!(x),0))
                                               ^
    dhcp-manager/systemd-dhcp/src/libsystemd-network/sd-dhcp-client.c:120:24: error: duplicate 'const' declaration specifier [-Werror,-Wduplicate-decl-specifier]
    ../src/dhcp-manager/systemd-dhcp/src/shared/macro.h:379:47: note: expanded from macro 'IN_SET'
                    for (_i = 0; _i < 1 + sizeof((const typeof(_x)[]) { __VA_ARGS__ })/sizeof(const typeof(_x)); _i++) \
                                                  ^
    ../src/dhcp-manager/systemd-dhcp/src/shared/macro.h:238:34: note: expanded from macro 'assert_return'
                    if (_unlikely_(!(expr))) {                              \
                                     ^
    ../src/dhcp-manager/systemd-dhcp/src/shared/macro.h:42:44: note: expanded from macro '_unlikely_'
    #define _unlikely_(x) (__builtin_expect(!!(x),0))
                                               ^
    dhcp-manager/systemd-dhcp/src/libsystemd-network/sd-dhcp-client.c:120:24: error: duplicate 'const' declaration specifier [-Werror,-Wduplicate-decl-specifier]
    ../src/dhcp-manager/systemd-dhcp/src/shared/macro.h:379:91: note: expanded from macro 'IN_SET'
                    for (_i = 0; _i < 1 + sizeof((const typeof(_x)[]) { __VA_ARGS__ })/sizeof(const typeof(_x)); _i++) \
                                                                                              ^
    ../src/dhcp-manager/systemd-dhcp/src/shared/macro.h:238:34: note: expanded from macro 'assert_return'
                    if (_unlikely_(!(expr))) {                              \
                                     ^
    ../src/dhcp-manager/systemd-dhcp/src/shared/macro.h:42:44: note: expanded from macro '_unlikely_'
    #define _unlikely_(x) (__builtin_expect(!!(x),0))
                                               ^
    dhcp-manager/systemd-dhcp/src/libsystemd-network/sd-dhcp-client.c:120:24: error: duplicate 'const' declaration specifier [-Werror,-Wduplicate-decl-specifier]
    ../src/dhcp-manager/systemd-dhcp/src/shared/macro.h:380:31: note: expanded from macro 'IN_SET'
                            if (((const typeof(_x)[]) { _y, __VA_ARGS__ })[_i] == _x) { \
                                  ^
    ../src/dhcp-manager/systemd-dhcp/src/shared/macro.h:238:34: note: expanded from macro 'assert_return'
                    if (_unlikely_(!(expr))) {                              \
                                     ^
    ../src/dhcp-manager/systemd-dhcp/src/shared/macro.h:42:44: note: expanded from macro '_unlikely_'
    #define _unlikely_(x) (__builtin_expect(!!(x),0))
                                               ^

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-06 21:36:03 -06:00
Dan Williams
9c3dbb0268 sd-dhcp-client: fix REBOOT state handling
client->secs wasn't getting set in the REBOOT state, causing
an assertion.  REBOOT should work the same way as INIT, per
RFC 2131:

   secs          2  Filled in by client, seconds elapsed since client
                    began address acquisition or renewal process.

REBOOT is necessary because many DHCP servers (especially on
home routers) do not hand back the same IP address when in
response to a DISCOVER packet, even if the same client ID is used.
2014-11-06 21:36:03 -06:00
Dan Williams
389daa38f7 sd-dhcp-client: clean up raw socket sd_event_source when creating UDP source
The raw socket sd_event_source used for DHCP server solicitations
was simply dropped on the floor when creating the new UDP socket
after a lease has been acquired.  Clean it up properly so we're
not still listening and responding to events on it.
2014-11-06 21:36:03 -06:00
Dan Williams
d0bb1592f6 sd-dhcp-lease: expose load/save functions
They're useful outside of networkd itself.
2014-11-06 21:36:03 -06:00
Dan Williams
0c14c88745 sd-dhcp-lease: load/save client ID
The lease is intimately tied to the client ID in use, so when loading
and renewing a lease, the same client ID should be used.
2014-11-06 21:36:03 -06:00
Dan Williams
7c9db27a2e sd-dhcp-client: support custom client IDs
Non-ethernet interface types use different client identifier formats,
plus when doing DHCPv4 and DHCPv6 on the same interface, the client
identifier should be related per RFC 4361.  Thus let the caller
override the existing MAC-based client identifier if necessary.
2014-11-06 21:36:03 -06:00
Dan Williams
20462b5095 dhcp: add systemd DHCP code
This is a direct dump from systemd git on 2014-10-28, git commit
c4ac990007.  Only relevant files were included.

    SYSTEMD_DIR=../systemd
    COMMIT=c4ac990007cd0069bb7e76ec15dd731320f382fd

    mkdir -p ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/
    mkdir -p ./src/dhcp-manager/systemd-dhcp/src/shared/
    mkdir -p ./src/dhcp-manager/systemd-dhcp/src/systemd/

    (
       cd "$SYSTEMD_DIR"
       git checkout "$COMMIT"
       git clean -fdx
    )
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp-internal.h ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/dhcp-internal.h
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp-lease-internal.h ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/dhcp-lease-internal.h
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp-network.c ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/dhcp-network.c
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp-option.c ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/dhcp-option.c
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp-packet.c ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/dhcp-packet.c
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp-protocol.h ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/dhcp-protocol.h
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp6-internal.h ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/dhcp6-internal.h
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp6-lease-internal.h ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/dhcp6-lease-internal.h
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp6-network.c ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/dhcp6-network.c
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp6-option.c ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/dhcp6-option.c
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp6-protocol.h ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/dhcp6-protocol.h
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/network-internal.c ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/network-internal.c
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/network-internal.h ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/network-internal.h
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/sd-dhcp-client.c ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/sd-dhcp-client.c
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/sd-dhcp-lease.c ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/sd-dhcp-lease.c
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/sd-dhcp6-client.c ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/sd-dhcp6-client.c
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/sd-dhcp6-lease.c ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/sd-dhcp6-lease.c
    /bin/cp "$SYSTEMD_DIR"/src/shared/async.h ./src/dhcp-manager/systemd-dhcp/src/shared/async.h
    /bin/cp "$SYSTEMD_DIR"/src/shared/fileio.c ./src/dhcp-manager/systemd-dhcp/src/shared/fileio.c
    /bin/cp "$SYSTEMD_DIR"/src/shared/fileio.h ./src/dhcp-manager/systemd-dhcp/src/shared/fileio.h
    /bin/cp "$SYSTEMD_DIR"/src/shared/list.h ./src/dhcp-manager/systemd-dhcp/src/shared/list.h
    /bin/cp "$SYSTEMD_DIR"/src/shared/macro.h ./src/dhcp-manager/systemd-dhcp/src/shared/macro.h
    /bin/cp "$SYSTEMD_DIR"/src/shared/refcnt.h ./src/dhcp-manager/systemd-dhcp/src/shared/refcnt.h
    /bin/cp "$SYSTEMD_DIR"/src/shared/siphash24.c ./src/dhcp-manager/systemd-dhcp/src/shared/siphash24.c
    /bin/cp "$SYSTEMD_DIR"/src/shared/siphash24.h ./src/dhcp-manager/systemd-dhcp/src/shared/siphash24.h
    /bin/cp "$SYSTEMD_DIR"/src/shared/socket-util.h ./src/dhcp-manager/systemd-dhcp/src/shared/socket-util.h
    /bin/cp "$SYSTEMD_DIR"/src/shared/sparse-endian.h ./src/dhcp-manager/systemd-dhcp/src/shared/sparse-endian.h
    /bin/cp "$SYSTEMD_DIR"/src/shared/strv.c ./src/dhcp-manager/systemd-dhcp/src/shared/strv.c
    /bin/cp "$SYSTEMD_DIR"/src/shared/strv.h ./src/dhcp-manager/systemd-dhcp/src/shared/strv.h
    /bin/cp "$SYSTEMD_DIR"/src/shared/time-util.c ./src/dhcp-manager/systemd-dhcp/src/shared/time-util.c
    /bin/cp "$SYSTEMD_DIR"/src/shared/time-util.h ./src/dhcp-manager/systemd-dhcp/src/shared/time-util.h
    /bin/cp "$SYSTEMD_DIR"/src/shared/utf8.c ./src/dhcp-manager/systemd-dhcp/src/shared/utf8.c
    /bin/cp "$SYSTEMD_DIR"/src/shared/utf8.h ./src/dhcp-manager/systemd-dhcp/src/shared/utf8.h
    /bin/cp "$SYSTEMD_DIR"/src/shared/util.c ./src/dhcp-manager/systemd-dhcp/src/shared/util.c
    /bin/cp "$SYSTEMD_DIR"/src/shared/util.h ./src/dhcp-manager/systemd-dhcp/src/shared/util.h
    /bin/cp "$SYSTEMD_DIR"/src/shared/in-addr-util.c ./src/dhcp-manager/systemd-dhcp/src/shared/in-addr-util.c
    /bin/cp "$SYSTEMD_DIR"/src/shared/in-addr-util.h ./src/dhcp-manager/systemd-dhcp/src/shared/in-addr-util.h
    /bin/cp "$SYSTEMD_DIR"/src/systemd/_sd-common.h ./src/dhcp-manager/systemd-dhcp/src/systemd/_sd-common.h
    /bin/cp "$SYSTEMD_DIR"/src/systemd/sd-dhcp-client.h ./src/dhcp-manager/systemd-dhcp/src/systemd/sd-dhcp-client.h
    /bin/cp "$SYSTEMD_DIR"/src/systemd/sd-dhcp-lease.h ./src/dhcp-manager/systemd-dhcp/src/systemd/sd-dhcp-lease.h
    /bin/cp "$SYSTEMD_DIR"/src/systemd/sd-dhcp6-client.h ./src/dhcp-manager/systemd-dhcp/src/systemd/sd-dhcp6-client.h
    /bin/cp "$SYSTEMD_DIR"/src/systemd/sd-dhcp6-lease.h ./src/dhcp-manager/systemd-dhcp/src/systemd/sd-dhcp6-lease.h
    /bin/cp "$SYSTEMD_DIR"/src/systemd/sd-event.h ./src/dhcp-manager/systemd-dhcp/src/systemd/sd-event.h
    /bin/cp "$SYSTEMD_DIR"/src/systemd/sd-id128.h ./src/dhcp-manager/systemd-dhcp/src/systemd/sd-id128.h
2014-11-06 21:36:02 -06:00
Dan Williams
9f6c81caa0 sd-dhcp6-client: fix off-by-two error in DUID length
The duid data passed by the client does not include the DUID type,
but client->duid_len does account for the size of the DUID type.
2014-11-06 21:36:02 -06:00
Dan Williams
b062632474 merge: automatic VPN reconnect support (bgo #349151) 2014-11-06 21:28:04 -06:00
Dan Williams
6cbbb9c0bb vpn: reconnect on service failures (bgo #349151)
Attempt to reconnect the VPN on failures, except when the underlying
device fails.

https://bugzilla.gnome.org/show_bug.cgi?id=349151
2014-11-06 21:17:34 -06:00
Dan Williams
b11798a196 vpn/core: move VPN gateway route between devices when routing changes 2014-11-06 21:17:34 -06:00
Dan Williams
1f544d337c vpn: allow plugins to indicate 'can-persist' capability
The plugin can indicate that this connection can persist across link
changes and other connectivity dropouts by passing this option
back in the SetConfig() calls.
2014-11-06 21:17:34 -06:00
Dan Williams
a966a5e8b5 vpn: allow plugins to re-enter the STARTING state to indicate reconnect
If the VPN re-enters the STARTING state to indicate that it has
disconnected from the VPN server and is trying to reconnect, change
the VPN connection's state to indicate that connectivity may be
limited.  Wait for the VPN to provide updated IP configuration
information from the reconnect to change back to the ACTIVATED
state.
2014-11-06 21:17:34 -06:00
Dan Williams
2b9e442013 libnm/libnm-util: add VPN 'persistent' property
This property will indicate that the user wishes the VPN connection
to stay active until explicitly disconnected, even across link changes
or other interruptions.
2014-11-06 21:16:57 -06:00
Dan Williams
4b2935b9b8 merge: fix libnm signal/ordering issues (bgo #738979) 2014-11-06 20:54:30 -06:00
Dan Williams
e5827729d6 trivial: make _nm_object_reload_properties() private to nm-object.c 2014-11-06 20:51:58 -06:00
Dan Williams
52ae28f6e5 libnm: queue added/removed signals and suppress uninitialized notifications
Property notifications are queued during object initialization and
reloading, but the added/removed signals were emitted immediately
even before the object was fully initialized.

Additionally, depending on how long asynchronous initialization took,
the notifications could have been emitted before the object was
fully initialized as deferred_notify_cb() wasn't being suppressed
until all the properties were complete.

For synchronous intialization, signals could be emitted at various
times during initialization and not all of the object's properties
may be read.  Furthermore property notifications were queued in an
idle handler, which breaks users that may not use a mainloop.  All
signals and notifications should be emitted immediately after
initialization is complete for synchronous initialization.

To make things consistent and ensure that all signals and notifications
are emitted only when initialization is complete, queue signals for
deferred emission and only run notifications/signals when all the
object's properties have been read.  For synchronous initialization,
emit all notifications and signals immediately after initialization
and not from an idle handler.
2014-11-06 20:51:58 -06:00
Dan Williams
0a0f9a3b4e trivial: re-arrange NMObject class methods
Move class-related and initialization interface related methods to
the bottom.
2014-11-06 20:51:58 -06:00
Dan Williams
648270d469 libnm: cancel NMRemoteSettings/NMManager property reload when NM quits
If the operation isn't canceled it returns an error, printing this:

/libnm/client-nm-running:
(/home/dcbw/Development/fdo/NetworkManager/libnm/tests/.libs/lt-test-nm-client:17983): libnm-WARNING **: updated_properties: error reading NMRemoteSettings properties: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)
/bin/sh: line 5: 17983 Trace/breakpoint trap   ./libnm-test-launch.sh ${dir}$tst
FAIL: test-nm-client

which screws up testcases because they don't expect this message.
And in this case, since libnm knows that NM is exiting and will
just clear out the properties anyway, it's useless to print the message.
2014-11-06 20:51:58 -06:00
Jiří Klimeš
098d655ef1 cli: fix an error path in second level 'set' command of nmcli editor
Test case:
nmcli> goto ipv4.addresses
nmcli ipv4.addresses> set 1.1.1.1
Do you also want to set 'ipv4.method' to 'manual'? [yes]: no
nmcli ipv4.addresses> set 3.3.3.3/99
Error: failed to set 'addresses' property: invalid prefix '99'; <1-32> allowed
Do you also want to set 'ipv4.method' to 'manual'? [yes]:

The second question (after failed 'set') should not be asked.
2014-11-06 16:44:41 +01:00
Jiří Klimeš
32600a9035 cli: fix a regression in monitoring addresses vs. method changes
while editing an existing commention.
It was broken by commit 45590f809a that called
nm_connection_replace_settings_from_connection() which replaces settings with
connected signal handlers.
2014-11-06 12:47:17 +01:00
Thomas Haller
4b09f58555 nmcli/bash-completion: complete "help" for nmcli general status|permissions <TAB>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-06 10:38:18 +01:00
Thomas Haller
65b24725c5 nmcli/bash-completion: complete logging level "TRACE"
Fixes: bdea7d61d0
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-06 09:53:46 +01:00
Dan Williams
fb78b671d7 platform: fix lifetime/preferred type in _address_get_lifetime()
They are defined as gint32 but are assigned a guint32 value and
then immediately passed back to the caller of _address_get_lifetime()
as guint32.  They can never be negative, and may receive values
greater than G_MAXINT32, so they should be unsigned.
2014-11-05 12:44:59 -06:00
Lubomir Rintel
1b40c95c84 Revert "tui: additional fix for 'primary' option"
It makes no sense -- the primary option is specific to active-backup bonds; not
mandatory. It blocks validation and prvents using other options.

This reverts commit 37f12088e4.

https://bugzilla.redhat.com/show_bug.cgi?id=1142864
2014-11-04 10:11:06 +01:00
Lubomir Rintel
0276945fd3 cli: Activating an already activated connection fails
The new ActiveConnection starts in UNKNOWN state and we immediately assume
it failed. We should wait for DEACTIVATED or ACTIVATED instead.

https://bugzilla.gnome.org/show_bug.cgi?id=739339
2014-11-03 15:40:52 +01:00
Thomas Haller
b63f8c80f8 wimax/build: use NM_PRAGMA_WARNING_DISABLE() macro instead of #pragma
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-31 21:02:42 +01:00
Thomas Haller
e2179f0911 all: add macros to suppress compiler warnings
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-31 21:00:50 +01:00
Thomas Haller
b0e29b5bd3 doc: fix IGNORE_HFILES in libnm-glib
nm-dbus-helpers-private.h is a private header file to libnm-glib/.

nm-settings-connection-glue.h and nm-settings-glue.h are not part
of libnm-glib/, they are inside src/.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-31 18:59:33 +01:00
Thomas Haller
8b64b8012b doc: fix IGNORE_HFILES referencing non-existing *-bindings.h files
Fixes: 8ad3ff24ad
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-31 18:59:33 +01:00
Thomas Haller
119c0625af core: merge branch 'th/bgo738590_dhcp_server_route' (bgo #738590)
https://bugzilla.gnome.org/show_bug.cgi?id=738590

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-31 18:36:51 +01:00
Thomas Haller
3d7acbc427 dhcp: don't add special route to DHCP server when having direct route
When the DHCP server address is not on the same subnet, we used
to add a /32 route to the server IP address via the gateway.

Do not add this route, if we already got a direct route from DHCP.

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

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-31 18:35:31 +01:00
Thomas Haller
ff145486d1 core: add nm_ipX_config_get_direct_route_for_host() functions
add two functions nm_ip4_config_get_direct_route_for_host()
and nm_ip6_config_get_direct_route_for_host() to check if we have
a direct (non-gw) route to a certain host.

Signed-off-by: Thomas Haller <thaller@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=738590
2014-10-31 18:35:31 +01:00