Commit graph

12505 commits

Author SHA1 Message Date
Jiří Klimeš
f85ccf9a9e wifi: fix a problem in removing non-existing source
GLib-CRITICAL **: Source ID 4197 was not found when attempting to remove it

(cherry picked from commit 5fa369e95c)
2015-10-22 10:33:49 +02:00
Thomas Haller
2631174d4e ifcfg-rh: remove another unused variable in parse_ethtool_option()
(cherry picked from commit 58fc4381ff)
2015-10-20 17:43:40 +02:00
Thomas Haller
77f43defbe ifcfg-rh: remove unused variable in parse_ethtool_option()
(cherry picked from commit f840d9465f)
2015-10-20 17:41:25 +02:00
Thomas Haller
efa303ed82 ifcfg-rh: improve parsing of Wake-on-LAN options
Initscripts do:
    oldifs=$IFS;
    IFS=';';
    [ -n "${ETHTOOL_DELAY}" ] && /bin/usleep ${ETHTOOL_DELAY}
    for opts in $ETHTOOL_OPTS ; do
        IFS=$oldifs;
        if [[ "${opts}" =~ [[:space:]]*- ]]; then
            /sbin/ethtool $opts
        else
            /sbin/ethtool -s ${REALDEVICE} $opts
        fi
        IFS=';';
    done
    IFS=$oldifs;

thus, we want to split on ';', otherwise we parse
  "wol d;something else"
wrong.

Also, g_strsplit_set() returns multiple empty tokens. So
we must skip over empty tokens in case of "wol    d".

The @use_password was wrong, because we would warn if sopass is specified
before wol:
  "sopass AA:BB:CC:DD:EE:FF wol g"

More resilently handle wrong configurations:
  "wol pu wol m" => gives m.
  "wol pu wol" => should give NONE and warn (instead of "pu").

Also accept tab as separator.

(cherry picked from commit bd1c0086bd)
2015-10-20 17:19:59 +02:00
Beniamino Galvani
7cf30fe47e wake-on-lan: add option to keep existing settings
Add a new 'ignore' option to NMSettingWired.wake-on-lan which disables
management of wake-on-lan by NetworkManager (i.e. the pre-existing
option will not be touched). Also, change the default behavior to be
'ignore' instead of 'disabled'.

https://bugzilla.gnome.org/show_bug.cgi?id=755182
(cherry picked from commit e587dcb16e)
2015-10-20 17:13:21 +02:00
Beniamino Galvani
d952ee637f po: remove unused messages from Italian (it) translation
The messages were generated when the code contained preprocessor
strings inside translation macro. See commit 81e72d9483 and
https://bugzilla.gnome.org/show_bug.cgi?id=744998#c2
2015-10-20 15:40:21 +02:00
Jiří Klimeš
ca599fad70 nmcli: fix bash completion of words containing colon (rh #1271271)
Test:
$ sudo ip link add a🅱️c type dummy
$ nmcli device delete<Tab><Tab>
$ nmcli device delete a<Tab>

See also:
http://stackoverflow.com/questions/28479216/how-to-give-correct-suggestions-to-tab-complete-when-my-words-contains-colons
http://stackoverflow.com/questions/2805412/bash-completion-for-maven-escapes-colon/12495727

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

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

(cherry picked from commit 91dde2c865)
2015-10-20 12:05:58 +02:00
Lubomir Rintel
2d8a1ae56a ifcfg-rh/tests: add a missing file to the distribution
Fixes: 68eb350ad8
(cherry picked from commit cc6b07c439)
2015-10-19 16:47:42 +02:00
Thomas Haller
4321993296 core: merge branch 'th/wait-carrier-rh1079353'
The wait-for-carrier patches from rh#1079353 had several
issues. With this, the feature should work mostly.

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

(cherry picked from commit e5f7fa314c)
2015-10-19 15:51:40 +02:00
Thomas Haller
d65897222a device: properly cancel queued activation request
We would leak the NMActivationRequest when carrier didn't
come within timeout. We must properly set the state of the
activation request.

https://bugzilla.redhat.com/show_bug.cgi?id=1079353
Fixes: 0bfe635119
(cherry picked from commit 839330cd39)
2015-10-19 15:51:05 +02:00
Thomas Haller
be3aee8b32 device: don't wait for carrier when activating static connection
When the connection to be activated doesn't require carrier,
don't queue it to wait for it.

https://bugzilla.redhat.com/show_bug.cgi?id=1079353
Fixes: 0bfe635119
(cherry picked from commit 118de885ea)
2015-10-19 15:51:01 +02:00
Thomas Haller
971a7611bd device: refactor using nm_clear_g_source() for priv->carrier_wait_id
(cherry picked from commit c89fd1ea76)
2015-10-19 15:50:08 +02:00
Thomas Haller
31b594561c manager: fix activation without specified device
For an explicit user-request, we relax some checks when searching for a suitable
device; such as requiring-carrier.

Without this patch, a connection-up while the device has no carrier yet,
would fail right away with "No suitable device found for this connection."

https://bugzilla.redhat.com/show_bug.cgi?id=1079353
Fixes: 0bfe635119
(cherry picked from commit cff3e93527)
2015-10-19 15:50:03 +02:00
Thomas Haller
2a8c93e940 platform: fix link-detection for s390 CTC-type devices
Commit 02c6a93343 (rh#1212118)
introduced detection of CTC devices based on the driver name.

That was broken a while ago while refactoring.

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

Fixes: ddaea22332
(cherry picked from commit 8a6afe92c1)
2015-10-19 12:27:27 +02:00
Jiří Klimeš
ba46efd077 libnm: specify (transfer none) introspection annotation (bgo #756380)
Otherwise the callers would free the address and it would result in
double-free.

Ideally, the function would return const pointer, but changing it now
would require changing also other prototypes and much code due to
snowball effect of const.

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

(cherry picked from commit 237030ce2b)
2015-10-12 12:46:51 +02:00
Thomas Haller
6f06ec0aba macros: remove early return from nm_clear_g_signal_handler()
It is valid to call nm_clear_g_signal_handler() with missing
@self argument if (and only if) the @id is unspecified as well.

Remove the check for @self to get an assertion in case @id
is missing *and* @self is invalid. In this case,
g_signal_handler_disconnect() will raise a g_critical() for us.

Fixes: c33416178f
(cherry picked from commit 76958f94d4)
2015-10-12 11:14:33 +02:00
Jiří Klimeš
23313d711f macros: allow NULL pointer in nm_clear_g_signal_handler()
It does not make sense to issue an error. This should be a helper function.
"NetworkManager[18341]: nm_clear_g_signal_handler: assertion 'G_IS_OBJECT (self)' failed"
error started since commit e6d7fee5a6 due to that.

(cherry picked from commit c33416178f)
2015-10-12 11:14:31 +02:00
Thomas Haller
a77a3aa7dd device: fix wrongly managing external-down device due to not setting EXTERNAL_DOWN
The unmanaged-flag NM_UNMANAGED_EXTERNAL_DOWN is initially set during
nm_device_finish_init(). But it was only set if the device was down at
that point.

If due to a race the platform device was not yet initialized, a later
initialization in device_link_changed() would clear NM_UNMANAGED_PLATFORM_INIT.
If the device is not external-down (because it was already up during
nm_device_finish_init()), the device will be managed right away with
reason NM_DEVICE_STATE_REASON_NOW_MANAGED.

Together with commit e29ab54335, this
is a race that causes a failure to assume the external-down device.

https://bugzilla.redhat.com/show_bug.cgi?id=1269199
(cherry picked from commit 120847c8a3)
2015-10-09 23:41:34 +02:00
Thomas Haller
b15204d991 platform: downgrade logging level for "event-notification" messages
We get a lot of these debugging message, although the event is entirely
internal to NMLinuxPlatform and only interesting when debugging a problem
in platform itself.

Downgrade to TRACE level.

(cherry picked from commit 9f1eb190f7)
2015-10-09 15:40:10 +02:00
Jiří Klimeš
946c8e2152 tui: add a checkbox for ignore-auto-routes (bgo #756200)
https://bugzilla.gnome.org/show_bug.cgi?id=756200

(cherry picked from commit ce27e1e21e)
2015-10-09 09:31:49 +02:00
Beniamino Galvani
2d86d557f3 device/vlan: update VLAN MAC address when parent's one changes
When a VLAN has a bond as parent device the MAC address of the bond
may change when other devices are enslaved and then the VLAN would
have a MAC which is different from parent's one.

Let the VLAN device listen for changes in hw-address property of
parent and update its MAC address accordingly.

https://bugzilla.redhat.com/show_bug.cgi?id=1264322
(cherry picked from commit e6d7fee5a6)
2015-10-08 22:13:26 +02:00
Thomas Haller
cde15dda2e device: fix race wrongly managing external-down device due to late udev signal
Executing:

  # brctl addbr lbr0
  # ip addr add 10.1.1.1/24 dev lbr0
  # ip link set lbr0 up

can result in a race so that NetworkManager would manage the device
(and clear the IP addresses).

It happens, when NetworkManager first receives platform signals that
the device is already up:

    signal: link changed: 11: lbr0 <UP,LOWER_UP;broadcast,multicast,up,running,lowerup> mtu 1500 arp 1 bridge* not-init addrgenmode eui64 addr D2:A1:B4:17:18:F2 driver bridge

Note that the device is still unknown via udev (not-init). The
unmanaged-state NM_UNMANAGED_EXTERNAL_DOWN gets cleared, but the
device still stays unmanaged.

Only afterwards the device is known in udev:

    signal: link changed: 11: lbr0 <UP,LOWER_UP;broadcast,multicast,up,running,lowerup> mtu 1500 arp 1 bridge* init addrgenmode eui64 addr D2:A1:B4:17:18:F2 driver bridge

At this point, we also clear NM_UNMANAGED_PLATFORM_INIT, making
the device managed with reason NM_DEVICE_STATE_REASON_NOW_MANAGED.
That results in managing the external device.

Fix that by only clearing NM_UNMANAGED_EXTERNAL_DOWN after the device
is no longer NM_UNMANAGED_PLATFORM_INIT.

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

(cherry picked from commit e29ab54335)
2015-10-08 20:06:15 +02:00
Josef Bacik
004ce1e1e0 ifcfg-rh: accept BOOTPROTO=static with missing IPv4 addresses
Dracut when faced with an ipv6 only setup during kickstart will generate a ifcfg
file that sets the ipv4 address things to null but sets BOOTPROTO=static.  This
makes network manager screw up because it expects an ipv4 address to be set.
Instead deal with this case by checking if we have any ipv4 addrs set, and if
not just disable ipv4.  This fixes our inability to kickstart in our ipv6 only
clusters.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fb.com>

https://mail.gnome.org/archives/networkmanager-list/2015-October/msg00015.html
(cherry picked from commit 68eb350ad8)
2015-10-08 19:02:45 +02:00
Lubomir Rintel
95e8b165a7 systemd,dhcpv6: clean up the lease on client reset
Upstream systemd.git commit 4e3e667 [sd-dhcp6-client: Fix unreferencing
DHCPv6 lease on client reset].

Fixed on master already.

https://bugzilla.redhat.com/show_bug.cgi?id=1260727
2015-10-08 15:21:43 +02:00
Lubomir Rintel
ac633f6f2e dhcp-systemd: sd_dhcp_lease_load() returns no lease or error on ENOENT
If the lease file doesn't exist sd_dhcp_lease_load() still indicates
success while not returning any lease, resulting in an assertion fail
when we try to generate an IP4Config:

  #0  g_logv (log_domain=0x7f309b45dba0 "NetworkManager", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7ffc815c38e0) at gmessages.c:1046
  #1  0x00007f3097d4fa3f in g_log (log_domain=log_domain@entry=0x7f309b45dba0 "NetworkManager", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7f3097dbd73d "%s: assertion '%s' failed")
      at gmessages.c:1079
  #2  0x00007f3097d4fa79 in g_return_if_fail_warning (log_domain=log_domain@entry=0x7f309b45dba0 "NetworkManager", pretty_function=pretty_function@entry=0x7f309b456b30 <__FUNCTION__.31435> "lease_to_ip4_config",
      expression=expression@entry=0x7f309b456417 "lease != NULL") at gmessages.c:1088
  #3  0x00007f309b35454a in lease_to_ip4_config (lease=0x0, options=options@entry=0x0, default_priority=default_priority@entry=100, log_lease=log_lease@entry=0, error=0x0) at dhcp-manager/nm-dhcp-systemd.c:230
  #4  0x00007f309b3546a0 in nm_dhcp_systemd_get_lease_ip_configs (iface=<optimized out>, uuid=<optimized out>, ipv6=<optimized out>, default_route_metric=100) at dhcp-manager/nm-dhcp-systemd.c:397
  #5  0x00007f309b35ed4a in find_ip4_lease_config (ext_ip4_config=0x7f309cbe8640, connection=0x7f309cb98250, self=0x7f309cbfb7b0) at devices/nm-device.c:7215
  #6  capture_lease_config (ext_ip6_config=0x0, out_ip6_config=0x0, out_ip4_config=0x7f309cbfb5d0, ext_ip4_config=0x7f309cbe8640, self=0x7f309cbfb7b0) at devices/nm-device.c:7289
  #7  update_ip4_config (self=self@entry=0x7f309cbfb7b0, initial=initial@entry=1) at devices/nm-device.c:7323
  #8  0x00007f309b3608be in nm_device_capture_initial_config (self=self@entry=0x7f309cbfb7b0) at devices/nm-device.c:7428
  #9  0x00007f309b3dbaad in get_existing_connection (out_generated=<synthetic pointer>, device=0x7f309cbfb7b0, manager=0x7f309cb7f150) at nm-manager.c:1550
  #10 recheck_assume_connection (device=device@entry=0x7f309cbfb7b0, user_data=user_data@entry=0x7f309cb7f150) at nm-manager.c:1689
  #11 0x00007f309b3dc62d in add_device (self=0x7f309cb7f150, device=0x7f309cbfb7b0, try_assume=1) at nm-manager.c:1875
  #12 0x00007f309b3dcd10 in platform_link_added (self=self@entry=0x7f309cb7f150, ifindex=<optimized out>, plink=plink@entry=0x7f309cbcff40) at nm-manager.c:1984
  #13 0x00007f309b3df7d4 in platform_query_devices (self=0x7f309cb7f150) at nm-manager.c:2056
  #14 nm_manager_start (self=0x7f309cb7f150) at nm-manager.c:4220
  #15 0x00007f309b341f2c in main (argc=1, argv=0x7ffc815c3f68) at main.c:494

(cherry picked from commit a8af3fae57)
2015-10-08 12:23:11 +02:00
Lubomir Rintel
5823bede98 device: don't complain about repeated schedules of the same activation stage
Can easily happend with a storm of DHCP responses or RAs before the idle
handler has a chance to run.

https://bugzilla.redhat.com/show_bug.cgi?id=1269520
(cherry picked from commit 3abe1bb21a)
2015-10-07 15:56:44 +02:00
Jiří Klimeš
cf1896987d ifcfg-rh: write REORDER_HDR as more common "yes", "no"
initscripts just search for negative values "no" or "0"
(/etc/sysconfig/network-scripts/ifup)

Related: ccea442504
(cherry picked from commit ee3c6d57a4)
2015-10-07 14:00:59 +02:00
Jiří Klimeš
6289caf68f ifcfg-rh: allow svTrueValue() to accept "0" and "1" values
Some initscripts variables can use "0" or "1" instead of more common
"yes", "no", for example REORDER_HDR.

And we also write REORDER_HDR=0|1 in writer.c, so we did not read REODER_HDR
correctly.

Fixes: ccea442504
(cherry picked from commit e8257af0d9)
2015-10-07 14:00:59 +02:00
Jiří Klimeš
b10e09ac17 libnm/vlan: default to vlan.flags=REORDER_HDR for new connections (rh #1250225)
The kernel defaults REORDER_HDR to 1 when creating a new VLAN, but
NetworkManager's VLAN flags property defaulted to 0. Thus REORDER_HDR was not
set for NM-created VLANs with default values.

We want to match the kernel default, so we change the default value for the
vlan.flags property. However, we do not want to change the flags for existing
connections if the property is missing in connection files. Thus we have to
update plugins for that. We also make sure that vlan.flags is always written
by 'keyfile' when the value is default. That way new connections have flags
property explicitly written and it will be loaded as expected.

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

(cherry picked from commit 687b651598)
2015-10-07 14:00:59 +02:00
Thomas Haller
2806fc985b systemd: make NetworkManager reloadable via SIGHUP
Since f9e4af2, parts of the configuration can be reloaded
by sending SIGHUP to NetworkManager. Add ExecReload option
to service file to support reloading by sending a signal.

Note that 'man 5 systemd.service' advices to use a blocking
command instead of a sending a signal. Later we should add a
D-Bus method to allow reloading synchronously. For now, this
is better then nothing.

https://mail.gnome.org/archives/networkmanager-list/2015-April/msg00042.html
(cherry picked from commit a858b383c3)
2015-10-07 13:59:30 +02:00
Thomas Haller
4e0882e923 device: assert that master-ready handler is not scheduled in schedule_stage2_device_config()
(cherry picked from commit c41be469ab)
2015-10-06 17:41:31 +02:00
Thomas Haller
7828003bf8 device: handle master-ready before scheduling stage2
Don't handle master-ready at the beginning of stage2, but instead while
scheduling (and then possibly delaying the scheduling of stage2).

This seems more idiomatic:

  When inside a stage and your part is done: call schedule-next-stage.
  That is, always schedule the next stage, not the current one.
  schedule-next-stage then might delay to really scheduling until the
  device is ready for the next state.

Fixes: 85ac903bb8
(cherry picked from commit 7bbc090387)
2015-10-06 17:41:30 +02:00
Thomas Haller
5c20dd9ea3 device: fix activating master/slave devices during stage2
During stage2, if the slave detected that it would need to wait for
the master, it would return FALSE (which removes the g-idle-handler).

However, it would not clear the activation-source, so later, when
the master becomes ready, its attempt to schedule stage2 again would
result in an error-log and the idle-handler would not be scheduled
again.

Fixes: 85ac903bb8
https://bugzilla.redhat.com/show_bug.cgi?id=1268797
https://bugzilla.redhat.com/show_bug.cgi?id=1183444
(cherry picked from commit c5210b322d)
2015-10-06 17:41:27 +02:00
Thomas Haller
9796eace51 code: merge branch 'th/enslave-team-rh1183444'
https://bugzilla.redhat.com/show_bug.cgi?id=1183444

(cherry picked from commit 18b20c4f6f)
2015-10-02 18:52:37 +02:00
Thomas Haller
5f8aa51e63 device: fix activating slave device when stage1 delays action
When activating for example a team device which is to be enslaved to a
bridge, nm_device_activate_stage1_device_prepare() will postpone
stage 2.

In that case, we didn't register the "master-ready" of the team
device and thus never progressed the slave from stage2.

Reproduce:

  # nmcli connection delete t-br0
  # nmcli connection delete t-team0
  nmcli connection add type bridge con-name t-br0   autoconnect no ifname i-br0 ip4 192.168.177.100/24 gw4 192.168.177.1
  nmcli connection add type team   con-name t-team0 autoconnect no ifname i-team0
  nmcli connection modify id t-team0 connection.master i-br0 connection.slave-type bridge
  nmcli connection up t-team0
2015-10-02 18:51:15 +02:00
Thomas Haller
86b6b6ed32 device: use nm_clear_g_signal_handler() to clear master-ready signal handler 2015-10-02 18:51:15 +02:00
Thomas Haller
720c53f9f1 macros: add nm_clear_g_signal_handler() helper 2015-10-02 18:51:15 +02:00
Jiří Klimeš
1649fb2928 wifi: emit NEW_BSS on ScanDone to update APs in Wi-Fi device (rh #1267327)
When a Wi-Fi is switched to AP mode, NMDeviceWifi forgets the AP scan list.
Later, when the device goes back to normal managed mode, the device was not
able to acquire the AP list again (for a long time), because the list is only
populated when a new BSS is signalled. And that could take very long or never
happen as the supplicant would have to lost the BSS and announce it later.

Fix the problem by announcing known BSSs as a response to ScanDone signal.

Testcase:
$ nmcli con add type wifi ifname wlan0 con-name my-wifi-ap autoconnect off ssid MYSSID
$ nmcli con modify my-wifi-ap wifi.mode ap ipv4.method shared
$ nmcli con up my-wifi-ap
$ nmcli con down my-wifi-ap
$ nmcli device wifi list

https://bugzilla.redhat.com/show_bug.cgi?id=1267327
2015-10-02 09:16:00 +02:00
Jiří Klimeš
4b9b3d02c9 supplicant: fix BSSs property type
BSSs property is an array of object paths, not strings.
2015-10-02 09:16:00 +02:00
Lubomir Rintel
f7617511bb nm-vpn-service-plugin: increase the quit timer
We now (since 3272ff6 libnm/libnm-glib: don't quit in the middle of asking for
secrets) always hook on the quit timer when NM asks the plugin if it needs
secrets. The timer is 20 seconds, which seems too short.

Let's make it three minutes. Don't bother adding another timer or using a
distinct timeout: it does no harm for the plugin to remain unused for three
minutes on a bus.

Another option would be to completely unhook it; however the plugin wouldn't
learn if the user cancelled the NM's secrets request and would remain unused
on the bus forever.

(cherry picked from commit b1512221bc)
2015-10-01 17:38:21 +02:00
Thomas Haller
e0ca2bdb63 build: extract version macros from "nm-version.h" to new header file "nm-version-macros.h"
For libnm library, "nm-dbus-interface.h" contains defines like the D-Bus
paths of NetworkManager. It is desirable to have this header usable without
having a dependency on "glib.h", for example for a QT application. For that,
commit c0852964a8 removed that dependancy.

For libnm-glib library, the analog to "nm-dbus-interface.h" is
"NetworkManager.h", and the same applies there. Commit
159e827a72 removed that include.
However, that broke build on PackageKit [1] which expected to get the
version macros by including "NetworkManager.h". So at least for libnm-glib,
we need to preserve old behavior so that a user including
"NetworkManager.h" gets the version macros, but not "glib.h".

Extract the version macros to a new header file "nm-version-macros.h".
This header doesn't include "glib.h" and can be included from
"NetworkManager.h". This gives as previous behavior and a glib-free
include.

For libnm we still don't include "nm-version-macros.h" to "nm-dbus-interface.h".
Very few users will actually need the version macros, but not using
libnm.
Users that use libnm, should just include (libnm's) "NetworkManager.h" to
get all headers.
As a special case, a user who doesn't want to use glib/libnm, but still
needs both "nm-dbus-interface.h" and "nm-version-macros.h", can include
them both separately.

[1] https://github.com/hughsie/PackageKit/issues/85

Fixes: 4545a7fe96
(cherry picked from commit 7bf10a75db)
2015-09-30 23:35:52 +02:00
Lubomir Rintel
e19d5519ca dnsmasq-manager: forget the watch when the callback hits
It removes the source, we shouldn't try to remove it on dispose() then.

(cherry picked from commit 4fe86b0031)
2015-09-30 23:13:10 +02:00
Lubomir Rintel
e88161172e tui: add a missing include to fix build
Fixes: 269a4483be
2015-09-30 19:37:10 +02:00
Thomas Haller
269a4483be tui: fix crash during activation when failed to create secret-agent
NetworkManager only allows one 'client:user-id' to register as secret
agent. Thus, when starting nmtui in two terminals, creating the secret
agent can fail.

This can lead to a crash.

https://bugzilla.gnome.org/show_bug.cgi?id=755883
(cherry picked from commit b861900d45)
2015-09-30 17:38:04 +02:00
Lubomir Rintel
3f08333847 build: add .travis.yml
(cherry picked from commit df27e6d5fd)
2015-09-30 13:53:24 +02:00
Lubomir Rintel
e69924235d build: set -Werror when checking whether a -W<warning> option works
Otherwise the check is effectively a no-op and unknown options still get
turned on. This results in unknown warnings when build without
--with-extra-warnings=error:

  warning: unknown warning option '-Wno-unused-but-set-variable'; did you mean '-Wno-unused-const-variable'? [-Wunknown-warning-option]

(cherry picked from commit b38bc15747)
2015-09-30 10:58:56 +02:00
Lubomir Rintel
105e30efba vpn-connection: set the MTU for the VPN IP interface
The 9b79e6c73 commit moved setting of the MTU from IP4Config to NMDevice, but
VPN connections don't have a NMDevice instance (yet). Set the MTU also from the
VPN connection. Also, copying of the MTU to the IP4Config is no longer needed
as the ip4_config_commit no longer sets the MTU.

Fixes: 9b79e6c732

https://bugzilla.gnome.org/show_bug.cgi?id=754781
(cherry picked from commit e0fa48f224)
2015-09-29 18:25:54 +02:00
Jiří Klimeš
9736327b26 wifi: fix a crash in on_bss_proxy_acquired() (rh #1266003)
g_dbus_proxy_get_cached_property_names() function can return NULL.

 Program received signal SIGSEGV, Segmentation fault.
 on_bss_proxy_acquired (proxy=0x7fffe4003880 [GDBusProxy], result=0x895490, user_data=<optimized out>) at supplicant-manager/nm-supplicant-interface.c:159
 159		while (*iter) {
 (gdb) bt
 #0  0x000000000048fac7 in on_bss_proxy_acquired (proxy=0x7fffe4003880 [GDBusProxy], result=0x895490, user_data=<optimized out>)
     at supplicant-manager/nm-supplicant-interface.c:159
 #1  0x0000003bf84728b7 in g_simple_async_result_complete (simple=0x895490 [GSimpleAsyncResult]) at gsimpleasyncresult.c:763
 #2  0x0000003bf8472919 in complete_in_idle_cb (data=<optimized out>) at gsimpleasyncresult.c:775
 #3  0x0000003bf5c497fb in g_main_context_dispatch (context=0x7d6420) at gmain.c:3111
 #4  0x0000003bf5c497fb in g_main_context_dispatch (context=context@entry=0x7d6420) at gmain.c:3710
 #5  0x0000003bf5c49b98 in g_main_context_iterate (context=0x7d6420, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3781
 #6  0x0000003bf5c49ec2 in g_main_loop_run (loop=0x7d64e0) at gmain.c:3975
 #7  0x00000000004349d6 in main (argc=1, argv=0x7fffffffe598) at main.c:486

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

(cherry picked from commit 33527341b1)
2015-09-29 12:49:35 +02:00
Lubomir Rintel
f909ce18dc contrib/rpm: regenerate automake with locally present version
The modification of po/Makefile.in.in may trigger re-run of autotools and it
would fail if the versions differ.

Fixes: 2318c0de92
(cherry picked from commit 8e6a839d93)
2015-09-28 19:50:58 +02:00
Thomas Haller
f7234f11ad Revert "libnm-util: don't include "nm-version.h" in "NetworkManager.h""
This breaks build of PackageKit. Revert the patch.

This reverts commit 159e827a72.

https://bugzilla.gnome.org/show_bug.cgi?id=755660
(cherry picked from commit 4545a7fe96)
2015-09-26 13:38:36 +02:00