Commit Graph

15047 Commits

Author SHA1 Message Date
Thomas Haller
7b43e0526e contrib/nm-live-vm: change scripts to be run by unprevileged user
The user must still be member of the 'mock' group though.

Also, hack something, that the current git repositoy will be reused, so
that we don't have to fetch the entire repositoy from upstream.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 17:42:09 +02:00
Jiří Klimeš
b0f9302e1f contrib/nm-live-vm: add 'teamd' and 'libteam' packages to the VM for teaming to work 2014-06-30 17:42:09 +02:00
Jiří Klimeš
b22b063f97 contrib/nm-live-vm: add some debugging tools and useful utilities 2014-06-30 17:42:09 +02:00
Thomas Haller
2469601a0e build: 'nm-setting-docs.xml' must depend on 'NetworkManager-1.0.typelib'
Build of 'nm-setting-docs.xml' must depend on 'NetworkManager-1.0.typelib', otherwise
'NetworkManager-1.0.typelib' is not yet created and './generate-setting-docs.py'
fails.

  g-ir-scanner: compile: gcc -Wall -Wno-deprecated-declarations -pthread -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -Wall -std=gnu89 -g -Og -Wshadow -Wmissing-declarations -Wmiss
  g-ir-scanner: link: /bin/sh ../libtool --mode=link --tag=CC gcc -o /NetworkManager/libnm-util/tmp-introspectEda05I/NetworkManager-1.0 -export-dynamic -Wall -std=gnu89 -g -Og -Wshadow -Wmissing-declarations -Wmissing-prototypes -Wdeclarat
  libtool: link: gcc -o /NetworkManager/libnm-util/tmp-introspectEda05I/.libs/NetworkManager-1.0 -Wall -std=gnu89 -g -Og -Wshadow -Wmissing-declarations -Wmissing-prototypes -Wdeclaration-after-statement -Wformat-security -Wfloat-equal -Wn
  export GI_TYPELIB_PATH=/NetworkManager/libnm-util${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}; \
  export LD_LIBRARY_PATH=/NetworkManager/libnm-util/.libs${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}; \
  strace -o /tmp/strace.out ./generate-setting-docs.py \
          --gir ./NetworkManager-1.0.gir \
          --output nm-setting-docs.xml
  ERROR:root:Could not find any typelib for NetworkManager
  Traceback (most recent call last):
    File "./generate-setting-docs.py", line 19, in <module>
      from gi.repository import NetworkManager, GObject
  ImportError: cannot import name NetworkManager
  make[4]: *** [nm-setting-docs.xml] Error 1

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 17:42:08 +02:00
Jiří Klimeš
c976724571 contrib/nm-live-vm: correct and simplify paths for configure 2014-06-30 17:42:08 +02:00
Jiří Klimeš
ebc1183542 contrib/nm-live-vm: documentation/man pages now depend on '--enable-gtk-doc' 2014-06-30 17:42:08 +02:00
Jiří Klimeš
f1c0a1a85b contrib/nm-live-vm: put the archive name explicitly inside the bundled script
Getting the archive name from the bundled script file name is fragile.
2014-06-30 17:42:08 +02:00
Jiří Klimeš
514d594e9d contrib/nm-live-vm: add 'gdb' to the VM
It is very helful for testing the size doesn't hurt (~ 2 MB)
2014-06-30 17:42:08 +02:00
Jiří Klimeš
39fdae3799 contrib/nm-live-vm: set of scripts for building a live initramfs for NM testing
The scripts use Fedora to build a Fedora 18 (i386) live image, and pack
it into a single self-extracting script, that can be easily distributed.

$ sudo ./build [-n name] [-b branch/commit]
will create name-bundle.sh with NM built of a specified NM branch(commit).
(defaults are: name="nm-live-vm"; branch="master")

Resulting nm-live-vm-bundle.sh can be run with almost any distro.
The only requirement is qemu-kvm (and VNC (tigervnc) on RHEL).
2014-06-30 17:42:08 +02:00
Giovanni Campagna
86ca7dce0c core: don't reject activating devices with incomplete IP config
An activating device may have an IP config that is unrelated to
the current activation (for example if it comes from capturing
the existing config when NM is started), and that config might
not have a gateway, which would have NM ignore that the device
is activating until after DHCP.

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

[thaller@redhat.com: move variables inside if-block]
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 16:58:35 +02:00
Thomas Haller
2a89258562 platform: fix invalid address lifetimes on startup
When starting, the initally loaded addresses were not fixed to have
absolute lifetimes.

This also leads to a crash due to failed assertion[1], when having
already expired addresses during NetworkManager start.

[1] backtrace:
  #0  0x00007f39db91ec39 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
  #1  0x00007f39db920348 in __GI_abort () at abort.c:89
  #2  0x00007f39dc35a0ed in _g_log_abort () at gmessages.c:255
  #3  0x00007f39dc377c97 in g_assertion_message (domain=domain@entry=0x7f39e0085c67 "NetworkManager", file=file@entry=0x7f39e007f070 "platform/nm-linux-platform.c", line=line@entry=1146,
      func=func@entry=0x7f39e0081430 <__FUNCTION__.23775> "_init_ip_address_lifetime", message=message@entry=0x7f39e13828b0 "assertion failed: (a_preferred <= a_valid && a_valid > 0 && a_preferred > 0)") at gtestutils.c:2278
  #4  0x00007f39dc377cfa in g_assertion_message_expr (domain=domain@entry=0x7f39e0085c67 "NetworkManager", file=file@entry=0x7f39e007f070 "platform/nm-linux-platform.c", line=line@entry=1146,
      func=func@entry=0x7f39e0081430 <__FUNCTION__.23775> "_init_ip_address_lifetime", expr=expr@entry=0x7f39e007f4e8 "a_preferred <= a_valid && a_valid > 0 && a_preferred > 0") at gtestutils.c:2293
  #5  0x00007f39e0004608 in _init_ip_address_lifetime (address=address@entry=0x7fff7f8a2580, rtnladdr=rtnladdr@entry=0x7f39e12cdb20) at platform/nm-linux-platform.c:1144
  #6  0x00007f39e0004ae4 in init_ip6_address (address=address@entry=0x7fff7f8a2580, rtnladdr=rtnladdr@entry=0x7f39e12cdb20) at platform/nm-linux-platform.c:1216
  #7  0x00007f39e000a75e in ip6_address_get_all (platform=<optimized out>, ifindex=3) at platform/nm-linux-platform.c:3342
  #8  0x00007f39e0032729 in nm_ip6_config_capture (ifindex=ifindex@entry=3, capture_resolv_conf=capture_resolv_conf@entry=0, use_temporary=use_temporary@entry=NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN) at nm-ip6-config.c:303
  #9  0x00007f39dffee8fa in update_ip_config (self=0x7f39e1380300, initial=<optimized out>) at devices/nm-device.c:5841
  #10 0x00007f39dffef52a in nm_device_capture_initial_config (dev=<optimized out>) at devices/nm-device.c:5869
  #11 0x00007f39e003e74e in get_existing_connection (manager=manager@entry=0x7f39e132b150, device=device@entry=0x7f39e1380300) at nm-manager.c:1576
  #12 0x00007f39e003edb2 in add_device (self=self@entry=0x7f39e132b150, device=device@entry=0x7f39e1380300, generate_con=<optimized out>) at nm-manager.c:1826
  #13 0x00007f39e003f503 in platform_link_added (reason=<optimized out>, plink=0x7f39e1372340, ifindex=3, self=0x7f39e132b150) at nm-manager.c:2205
  #14 platform_link_cb (platform=<optimized out>, ifindex=3, plink=0x7f39e1372340, change_type=<optimized out>, reason=<optimized out>, user_data=<optimized out>) at nm-manager.c:2220
  #15 0x00007f39da868d8c in ffi_call_unix64 () at ../src/x86/unix64.S:76
  #16 0x00007f39da8686bc in ffi_call (cif=cif@entry=0x7fff7f8a2a40, fn=0x7f39e003f360 <platform_link_cb>, rvalue=0x7fff7f8a29b0, avalue=avalue@entry=0x7fff7f8a2930) at ../src/x86/ffi64.c:522
  #17 0x00007f39dc84aad8 in g_cclosure_marshal_generic (closure=0x7f39e1368080, return_gvalue=0x0, n_param_values=<optimized out>, param_values=<optimized out>, invocation_hint=<optimized out>, marshal_data=0x0) at gclosure.c:1454
  #18 0x00007f39dc84a298 in g_closure_invoke (closure=0x7f39e1368080, return_value=return_value@entry=0x0, n_param_values=5, param_values=param_values@entry=0x7fff7f8a2c40, invocation_hint=invocation_hint@entry=0x7fff7f8a2be0)
      at gclosure.c:777
  #19 0x00007f39dc85c35d in signal_emit_unlocked_R (node=node@entry=0x7f39e12c16c0, detail=detail@entry=0, instance=instance@entry=0x7f39e12c30a0, emission_return=emission_return@entry=0x0,
      instance_and_params=instance_and_params@entry=0x7fff7f8a2c40) at gsignal.c:3586
  #20 0x00007f39dc8640f2 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fff7f8a2e20) at gsignal.c:3330
  #21 0x00007f39dc8643af in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=detail@entry=0) at gsignal.c:3386
  #22 0x00007f39e000e24c in nm_platform_query_devices () at platform/nm-platform.c:330
  #23 0x00007f39e0040f30 in nm_manager_start (self=0x7f39e132b150) at nm-manager.c:4207
  #24 0x00007f39dffe53ab in main (argc=1, argv=0x7fff7f8a3468) at main.c:657

Regression introduced by commit 8310a039d8.

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

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 14:19:27 +02:00
Dan Winship
9f82c16557 libnm-util: build nm-setting-docs.xml against uninstalled libnm-util
Set GI_TYPELIB_PATH and LD_LIBRARY_PATH so that we build
nm-setting-docs.xml against the just-built typelib and .so, not the
installed ones.
2014-06-27 17:24:58 -04:00
Dan Winship
377f72a66f build: fix nm-setting-docs build in various configurations
Certain build configurations (like --enable-gtk-doc
--disable-introspection) were broken with respect to nm-setting-docs.
Fix this. Also, we don't require just gobject-introspection, we need
pygobject specifically as well.
2014-06-27 17:24:57 -04:00
Thomas Haller
87c48023f1 libnm-util, libnm-glib: add NM_VERSION_1_0, NM_DEPRECATED_IN_1_0, and NM_DEPRECATED_IN_1_0 macros
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-27 20:39:05 +02:00
Thomas Haller
3e9b6666de po: remove obsolete reference to nm-modem-old.c file
This breaks `make check`.

Regression introduced by commit 1a3a5c4526.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-27 20:13:25 +02:00
Dan Williams
29297f8531 build: check harder for readline
Not all distros build their readline linked with a termcap library,
since apps are (apparently) supposed to choose one for themselves
and explicitly link to it when using readline.  So add some checks
to figure out whether readline is already linked, and if not, prefer
ncurses since we use that for nmtui already.

ax_lib_readline based off:

http://www.gnu.org/software/autoconf-archive/ax_lib_readline.html
2014-06-27 13:10:50 -05:00
Thomas Haller
32ebcbe7c7 core: log when creating team device as generic due to missing plugin
Previous commit 38a83e15a2 moves the
team device to a plugin. If the plugin is not available, we should
log an information that we create a generic device instead.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-27 17:02:23 +02:00
Thomas Haller
918ff2b0f7 team: merge branch 'th/bgo731905_team_plugin'
https://bugzilla.gnome.org/show_bug.cgi?id=731905
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-27 13:27:54 +02:00
Thomas Haller
71cc0b2345 team: remove conditional compilation WITH_TEAMDCTL
teamdctl related parts are now in the device plugin src/devices/team/*. Remove
the conditional compilation.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-27 13:27:01 +02:00
Thomas Haller
38a83e15a2 team: make team support a plugin
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-27 13:27:01 +02:00
Thomas Haller
dfe4b45f87 core: allow creation of virtual devices (software devices) via NMDeviceFactory
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-27 13:27:01 +02:00
Thomas Haller
4c206d0aaf core: refactor update_slave_connection() as virtual function of master device
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-27 13:27:01 +02:00
Thomas Haller
b855c7b64a team/trivial: rename NM_TEAM_ERROR* to NM_DEVICE_TEAM_ERROR*
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-27 13:27:01 +02:00
Thomas Haller
05e2e701a8 core: check file permissions when loading device plugins and order by file modification time
Refactor the loading of device plugins by creating the list of
module filenames in a separate function.

Thereby also check for file permissions (must be only modifiable by root)
and sort the files by last file modification time. This has the advantage,
that if several plugins provide the same device type, that we (deterministically)
prefer the most recent one.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-27 13:27:01 +02:00
Dan Winship
baab3cc641 wwan, bluetooth: drop support for ModemManager 0.7
https://bugzilla.gnome.org/show_bug.cgi?id=732176
2014-06-26 12:53:33 -04:00
Dan Winship
0013572225 wwan: trivial: simplify variable names to not explicitly clarify MM 1.0
Since we don't care about MM 0.7 now.
2014-06-26 12:53:33 -04:00
Dan Winship
1a3a5c4526 wwan, bluetooth: drop support for ModemManager 0.7 2014-06-26 12:53:33 -04:00
Dan Williams
c3e8ddf075 build: fix multiple definitions of DISTCLEANFILES
Multiple definitions added by dcc109516d
2014-06-26 11:38:30 -05:00
Thomas Haller
c35d63ddea settings: fix invalid signature in impl_settings_get_connection_by_uuid()
impl_settings_get_connection_by_uuid() was changed from a synchronous
function to an asynchronous one. Thereby the @out_object_path argument
was forgotten, leaving the function completely broken.

This bug has the potential to crash NetworkManager.

Regression introduced by commit 8ab8990938.

Found running
  $ ./dfuzzer -v -n com.redhat.ifcfgrh1

Related: https://bugzilla.redhat.com/show_bug.cgi?id=1113508

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-26 18:32:39 +02:00
Thomas Haller
7665585d4d core: fix crash in impl_settings_get_connection_by_uuid() when requesing non-existing uuid
Regression introduced by commit 8ab8990938.

Found running
  $ ./dfuzzer -v -n com.redhat.ifcfgrh1

Related: https://bugzilla.redhat.com/show_bug.cgi?id=1113508

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-26 17:39:52 +02:00
Jiří Klimeš
214f523f3f libnm-util: document "address-labels" property as for internal use only 2014-06-26 14:56:22 +02:00
Thomas Haller
adb3e37c74 contrib/rpm: cleanup of NetworkManager.spec by adding %{epoch_version} and %{git_sha_version}
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-25 22:11:57 +02:00
Yuri Chornoivan
65068af303 po: updated Ukranian translation (bgo #732172)
https://bugzilla.gnome.org/show_bug.cgi?id=732172

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-25 18:51:03 +02:00
Jiří Klimeš
c88b832ce9 keyfile: allow missing 'id' and 'uuid' in [connection] section (bgo #683345)
If 'id' is missing, it is automatically filled with base file name.
If 'uuid' is missing, it is automatically generated (hashing file path).

https://bugzilla.gnome.org/show_bug.cgi?id=683345
2014-06-25 16:26:59 +02:00
Jiří Klimeš
4b1dd4647e Revert "po: updated Ukranian translation (bgo #732172)"
This reverts commit 586851b86c.

The translation file was for PulseAudio, not NetworkMananger.
2014-06-25 15:29:31 +02:00
Yuri Chornoivan
586851b86c po: updated Ukranian translation (bgo #732172)
https://bugzilla.gnome.org/show_bug.cgi?id=732172

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-25 12:10:12 +02:00
Thomas Haller
fdf78b3d54 platform: don't announce routes/addresses that are not returned from get_all()
There is no point in raising events that a route/address was added, if
a subsequent call to ip4_address_get_all() et.al don't show these
objects.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-24 16:07:13 +02:00
Thomas Haller
f4db6f13cb core: fix assertion logging master device during activation
backtrace:
  #0  0x0000003370c504e9 in g_logv (log_domain=0x4c14cc "NetworkManager", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7fff420d05c0) at gmessages.c:989
  #1  0x0000003370c5063f in g_log (log_domain=log_domain@entry=0x4c14cc "NetworkManager", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x3370cbc89a "%s: assertion '%s' failed") at gmessages.c:1025
  #2  0x0000003370c50679 in g_return_if_fail_warning (log_domain=log_domain@entry=0x4c14cc "NetworkManager", pretty_function=pretty_function@entry=0x4b4710 <__PRETTY_FUNCTION__.35285> "nm_device_get_iface",
      expression=expression@entry=0x4b160a "self != NULL") at gmessages.c:1034
  #3  0x000000000042e39b in nm_device_get_iface (self=0x0) at devices/nm-device.c:501
  #4  0x00000000004393cc in nm_device_activate_stage3_ip_config_start (user_data=<optimized out>) at devices/nm-device.c:4062
  #5  0x0000003370c492a6 in g_main_dispatch (context=0x153b190) at gmain.c:3066
  #6  g_main_context_dispatch (context=context@entry=0x153b190) at gmain.c:3642
  #7  0x0000003370c49628 in g_main_context_iterate (context=0x153b190, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3713
  #8  0x0000003370c49a3a in g_main_loop_run (loop=0x153ae30) at gmain.c:3907
  #9  0x0000000000429f15 in main (argc=1, argv=0x7fff420d0b78) at main.c:678

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-24 16:07:13 +02:00
Thomas Haller
ed3f598f63 core: add utility function str_if_set()
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-24 16:07:07 +02:00
Thomas Haller
724fc736fe trivial: fix whitespace
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-24 14:28:27 +02:00
Jiří Klimeš
c8902e8171 Merge changes for Ctrl-C and Ctrl-D handling in nmcli/readline (bgo #706118)
https://bugzilla.gnome.org/show_bug.cgi?id=706118
2014-06-24 11:00:19 +02:00
Jiří Klimeš
12f284dee3 cli: make Ctrl-C exit nmcli when line is empty *and* we are not in the editor 2014-06-24 10:58:42 +02:00
Jiří Klimeš
7e75ccea7f cli: don't print "Error: nmcli terminated by signal Quit (3)" on Ctrl-D
Also make sure we don't print anything before quitting on Ctrl-D.
2014-06-24 10:52:16 +02:00
Jiří Klimeš
c0822f6054 cli: append NL to error messages and also print the signal name 2014-06-24 10:52:16 +02:00
Jiří Klimeš
dbf2d08559 cli: allow quitting on Ctrl-D while in readline()
Ctrl-D is mapped as a delete key in readline. When some input is on the line,
Ctrl-D behaves like 'Delete' key. When the line is empty, EOF is generated.
We quit on this EOF. It is the same behaviour many other interactive programs
exhibit, like bash, python, irb, etc.

Users can also quit unconditionally with Ctrl-\ that traditionally generates
SIGQUIT.
2014-06-24 10:52:15 +02:00
Jiří Klimeš
433c067522 cli: mitigate slowness of readline() for some broken versions
There was a bug in readline-6.2 causing very slow processing when
rl_event_hook was used [1]. This was fixed later after 6.2 was out.
Unfortunately some distributions don't include the fix. Fedora is one
example [2].
So we lower keyboard input timeout from 0.1s to 0.01s. This makes readline
more responsive. On the other hand it causes more interrupts, calling
rl_event_hook callback more often and thus slightly higher CPU usage.

[1] https://lists.gnu.org/archive/html/bug-readline/2012-06/msg00005.html
[2] related: https://bugzilla.redhat.com/show_bug.cgi?id=1109946

Note: this commit could (should) be reverted later when we check that most
distributions have the readline bug fixed.
2014-06-24 10:45:37 +02:00
Jiří Klimeš
512fe08c7e cli: don't quit nmcli on Ctrl-C while in readline()
We rather cancel the input and show new prompt on readline. It is more
expected behaviour for interactive input when quitting.
2014-06-24 10:38:14 +02:00
Thomas Haller
1dd50924c8 device: fix warning releasing of slave when slave device gets removed
When the slave device gets removed, the master is not in a state-change when
calling nm_device_release_one_slave(). This triggers a warning [1].

[1] backtrace:
  #0  0x0000003370c504e9 in g_logv (log_domain=0x4c144c "NetworkManager", log_level=G_LOG_LEVEL_WARNING, format=<optimized out>, args=args@entry=0x7fff8b1d35b0) at gmessages.c:989
  #1  0x0000003370c5063f in g_log (log_domain=log_domain@entry=0x4c144c "NetworkManager", log_level=log_level@entry=G_LOG_LEVEL_WARNING, format=format@entry=0x3370cc1fdc "%s") at gmessages.c:1025
  #2  0x0000003370c50956 in g_warn_message (domain=domain@entry=0x4c144c "NetworkManager", file=file@entry=0x4b14d5 "devices/nm-device.c", line=line@entry=841, func=func@entry=0x4b48f0 <__FUNCTION__.35456> "nm_device_release_one_slave",
      warnexpr=warnexpr@entry=0x0) at gmessages.c:1058
  #3  0x0000000000436c30 in nm_device_release_one_slave (dev=dev@entry=0xd92540, slave=slave@entry=0xdb0e50, configure=configure@entry=1) at devices/nm-device.c:841
  #4  0x000000000043a779 in slave_state_changed (slave=0xdb0e50, slave_new_state=NM_DEVICE_STATE_UNMANAGED, slave_old_state=NM_DEVICE_STATE_ACTIVATED, reason=<optimized out>, self=0xd92540) at devices/nm-device.c:1214
  #5  0x0000003371805d8c in ffi_call_unix64 () at ../src/x86/unix64.S:76
  #6  0x00000033718056bc in ffi_call (cif=cif@entry=0x7fff8b1d3a00, fn=0x43a677 <slave_state_changed>, rvalue=0x7fff8b1d3970, avalue=avalue@entry=0x7fff8b1d38f0) at ../src/x86/ffi64.c:522
  #7  0x0000003371c10ad8 in g_cclosure_marshal_generic (closure=0xd76120, return_gvalue=0x0, n_param_values=<optimized out>, param_values=<optimized out>, invocation_hint=<optimized out>, marshal_data=0x0) at gclosure.c:1454
  #8  0x0000003371c10298 in g_closure_invoke (closure=0xd76120, return_value=return_value@entry=0x0, n_param_values=4, param_values=param_values@entry=0x7fff8b1d3c00, invocation_hint=invocation_hint@entry=0x7fff8b1d3ba0) at gclosure.c:777
  #9  0x0000003371c2235d in signal_emit_unlocked_R (node=node@entry=0xd9d850, detail=detail@entry=0, instance=instance@entry=0xdb0e50, emission_return=emission_return@entry=0x0,
      instance_and_params=instance_and_params@entry=0x7fff8b1d3c00) at gsignal.c:3586
  #10 0x0000003371c2a0f2 in g_signal_emit_valist (instance=instance@entry=0xdb0e50, signal_id=signal_id@entry=68, detail=detail@entry=0, var_args=var_args@entry=0x7fff8b1d3e38) at gsignal.c:3330
  #11 0x0000003371c2a8f8 in g_signal_emit_by_name (instance=instance@entry=0xdb0e50, detailed_signal=detailed_signal@entry=0x4c3ce2 "state-changed") at gsignal.c:3426
  #12 0x000000000043754f in _set_state_full (device=device@entry=0xdb0e50, state=state@entry=NM_DEVICE_STATE_UNMANAGED, reason=reason@entry=NM_DEVICE_STATE_REASON_REMOVED, quitting=quitting@entry=0) at devices/nm-device.c:6689
  #13 0x000000000043797c in nm_device_state_changed (device=device@entry=0xdb0e50, state=state@entry=NM_DEVICE_STATE_UNMANAGED, reason=reason@entry=NM_DEVICE_STATE_REASON_REMOVED) at devices/nm-device.c:6823
  #14 0x0000000000439fe7 in nm_device_set_unmanaged (device=device@entry=0xdb0e50, flag=flag@entry=NM_UNMANAGED_INTERNAL, unmanaged=unmanaged@entry=1, reason=reason@entry=NM_DEVICE_STATE_REASON_REMOVED) at devices/nm-device.c:5983
  #15 0x00000000004799c2 in remove_device (manager=manager@entry=0xd86150, device=0xdb0e50, quitting=quitting@entry=0) at nm-manager.c:769
  #16 0x000000000047e3bf in platform_link_cb (platform=<optimized out>, ifindex=35, plink=<optimized out>, change_type=<optimized out>, reason=<optimized out>, user_data=<optimized out>) at nm-manager.c:2123
  #17 0x0000003371805d8c in ffi_call_unix64 () at ../src/x86/unix64.S:76
  #18 0x00000033718056bc in ffi_call (cif=cif@entry=0x7fff8b1d4320, fn=0x47e34b <platform_link_cb>, rvalue=0x7fff8b1d4290, avalue=avalue@entry=0x7fff8b1d4210) at ../src/x86/ffi64.c:522
  #19 0x0000003371c10ad8 in g_cclosure_marshal_generic (closure=0xd32e40, return_gvalue=0x0, n_param_values=<optimized out>, param_values=<optimized out>, invocation_hint=<optimized out>, marshal_data=0x0) at gclosure.c:1454
  #20 0x0000003371c10298 in g_closure_invoke (closure=0xd32e40, return_value=return_value@entry=0x0, n_param_values=5, param_values=param_values@entry=0x7fff8b1d4520, invocation_hint=invocation_hint@entry=0x7fff8b1d44c0) at gclosure.c:777
  #21 0x0000003371c2235d in signal_emit_unlocked_R (node=node@entry=0xcf5780, detail=detail@entry=0, instance=instance@entry=0xcf78a0, emission_return=emission_return@entry=0x0,
      instance_and_params=instance_and_params@entry=0x7fff8b1d4520) at gsignal.c:3586
  #22 0x0000003371c2a0f2 in g_signal_emit_valist (instance=instance@entry=0xcf78a0, signal_id=signal_id@entry=2, detail=detail@entry=0, var_args=var_args@entry=0x7fff8b1d4778) at gsignal.c:3330
  #23 0x0000003371c2a8f8 in g_signal_emit_by_name (instance=instance@entry=0xcf78a0, detailed_signal=detailed_signal@entry=0x4b183d "link-changed") at gsignal.c:3426
  #24 0x000000000044c6f3 in announce_object (platform=platform@entry=0xcf78a0, object=0xde1720, change_type=change_type@entry=NM_PLATFORM_SIGNAL_REMOVED, reason=reason@entry=NM_PLATFORM_REASON_EXTERNAL)
      at platform/nm-linux-platform.c:1572
  #25 0x000000000044ec07 in event_notification (msg=<optimized out>, user_data=<optimized out>) at platform/nm-linux-platform.c:1886
  #26 0x0000003844c1117f in nl_cb_call (msg=<optimized out>, type=<optimized out>, cb=<optimized out>) at ../include/netlink-private/netlink.h:141
  #27 recvmsgs (cb=0xcf7240, sk=0xcf7330) at nl.c:952
  #28 nl_recvmsgs_report (sk=0xcf7330, cb=0xcf7240) at nl.c:1003
  #29 0x0000003844c11549 in nl_recvmsgs (sk=<optimized out>, cb=<optimized out>) at nl.c:1027
  #30 0x0000003844c11569 in nl_recvmsgs_default (sk=<optimized out>) at nl.c:1041
  #31 0x000000000044e955 in event_handler (channel=<optimized out>, io_condition=<optimized out>, user_data=0xcf78a0) at platform/nm-linux-platform.c:3804
  #32 0x0000003370c492a6 in g_main_dispatch (context=0xcf5190) at gmain.c:3066
  #33 g_main_context_dispatch (context=context@entry=0xcf5190) at gmain.c:3642
  #34 0x0000003370c49628 in g_main_context_iterate (context=0xcf5190, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3713
  #35 0x0000003370c49a3a in g_main_loop_run (loop=0xcf4e30) at gmain.c:3907
  #36 0x0000000000429f15 in main (argc=1, argv=0x7fff8b1d4f38) at main.c:678

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-23 19:34:01 +02:00
Thomas Haller
41a20a75a1 tui: fix inverted option "Require IPvX addressing for this connection"
https://bugzilla.redhat.com/show_bug.cgi?id=1108839

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-23 19:09:44 +02:00
Thomas Haller
3d6936b2cc core: fix dhcp4_cleanup() to clear dhcp4_client first (avoids assert accessing NM_DEVICE_DHCP4_CONFIG)
dhcp4_cleanup() should first clear @dhcp4_client variables before
clearing @dhcp4_config. Otherwise the following assert fails [1] and
the DBUS property NM_DEVICE_DHCP4_CONFIG is set to %NULL.

Analog to dhcp6_cleanup(), dhcp6_client, and NM_DEVICE_DHCP6_CONFIG.

[1] backtrace:
  #0  0x0000003370c504e9 in g_logv (log_domain=0x4c148c "unrecognized-specs-changed", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7fff4710ed60) at gmessages.c:989
  #1  0x0000003370c5063f in g_log (log_domain=log_domain@entry=0x4c144c "NetworkManager", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x3370cbc89a "%s: assertion '%s' failed") at gmessages.c:1025
  #2  0x0000003370c50679 in g_return_if_fail_warning (log_domain=log_domain@entry=0x4c144c "NetworkManager", pretty_function=pretty_function@entry=0x4c6140 <__PRETTY_FUNCTION__.15969> "nm_dhcp4_config_get_dbus_path",
      expression=expression@entry=0x4c60d9 "NM_IS_DHCP4_CONFIG (self)") at gmessages.c:1034
  #3  0x000000000046b1d4 in nm_dhcp4_config_get_dbus_path (self=0x0) at nm-dhcp4-config.c:115
  #4  0x0000000000434791 in get_property (object=0x9d2320, prop_id=13, value=0x9618a0, pspec=0x9bbc20) at devices/nm-device.c:7539
  #5  0x0000003371c18e73 in object_get_property (value=0x9618a0, pspec=<optimized out>, object=0x9d2320) at gobject.c:1303
  #6  g_object_get_property (object=0x9d2320, property_name=<optimized out>, value=0x9618a0) at gobject.c:2402
  #7  0x000000000048482c in idle_id_reset (data=<optimized out>) at nm-properties-changed-signal.c:123
  #8  0x0000003371c13055 in g_cclosure_marshal_VOID__PARAM (closure=0x9618a0, return_value=0xffffffff, n_param_values=0, param_values=0x7fff4710f130, invocation_hint=0x0, marshal_data=0x4b5201) at gmarshal.c:1037
  #9  0x0000003371c10298 in g_closure_invoke (closure=0x2, closure@entry=0x919d00, return_value=return_value@entry=0x0, n_param_values=1192292656, param_values=0x9d2320, param_values@entry=0x7fff4710f130,
      invocation_hint=invocation_hint@entry=0x7fff4710f0d0) at gclosure.c:777
  #10 0x0000003371c21b87 in signal_emit_unlocked_R (node=node@entry=0x919d90, detail=detail@entry=667, instance=instance@entry=0x9d2320, emission_return=emission_return@entry=0x0,
      instance_and_params=instance_and_params@entry=0x7fff4710f130) at gsignal.c:3516
  #11 0x0000003371c2a0f2 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fff4710f2c0) at gsignal.c:3330
  #12 0x0000003371c2a3af in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3386
  #13 0x0000003371c14945 in g_object_dispatch_properties_changed (object=0x9d2320, n_pspecs=4294967295, pspecs=0x0) at gobject.c:1047
  #14 0x0000003371c17019 in g_object_notify_by_spec_internal (pspec=<optimized out>, object=0x9d2320) at gobject.c:1141
  #15 g_object_notify (object=0x9d2320, property_name=property_name@entry=0x4c400f "dhcp4-config") at gobject.c:1183
  #16 0x0000000000434332 in dhcp4_cleanup (self=self@entry=0x9d2320, stop=stop@entry=1, release=release@entry=0) at devices/nm-device.c:2581
  #17 0x0000000000434cab in _cleanup_generic_pre (self=self@entry=0x9d2320, deconfigure=deconfigure@entry=1) at devices/nm-device.c:6448
  #18 0x0000000000436db1 in nm_device_cleanup (self=self@entry=0x9d2320, reason=reason@entry=NM_DEVICE_STATE_REASON_REMOVED) at devices/nm-device.c:6524
  #19 0x0000000000437358 in _set_state_full (device=device@entry=0x9d2320, state=state@entry=NM_DEVICE_STATE_UNMANAGED, reason=reason@entry=NM_DEVICE_STATE_REASON_REMOVED, quitting=quitting@entry=0) at devices/nm-device.c:6641
  #20 0x000000000043797c in nm_device_state_changed (device=device@entry=0x9d2320, state=state@entry=NM_DEVICE_STATE_UNMANAGED, reason=reason@entry=NM_DEVICE_STATE_REASON_REMOVED) at devices/nm-device.c:6823
  #21 0x0000000000439fe7 in nm_device_set_unmanaged (device=device@entry=0x9d2320, flag=flag@entry=NM_UNMANAGED_INTERNAL, unmanaged=unmanaged@entry=1, reason=reason@entry=NM_DEVICE_STATE_REASON_REMOVED) at devices/nm-device.c:5983
  #22 0x000000000043a193 in nm_device_set_unmanaged_quitting (device=0x9d2320) at devices/nm-device.c:5998
  #23 0x00000000004799f9 in remove_device (manager=0x9b2150, device=0x9d2320, quitting=1) at nm-manager.c:775
  #24 0x000000000047bf47 in dispose (object=0x9b2150) at nm-manager.c:4935
  #25 0x0000003371c14ee8 in g_object_unref (_object=0x9b2150) at gobject.c:3160
  #26 0x0000000000429f43 in main (argc=1, argv=0x7fff4710f9a8) at main.c:681

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-23 17:51:51 +02:00