1. 11 Apr, 2019 3 commits
  2. 10 Apr, 2019 2 commits
  3. 09 Apr, 2019 1 commit
    • Beniamino Galvani's avatar
      libnm-core: fix invalid memory access · 3fa39f61
      Beniamino Galvani authored
      When we delete the runner.name property, the runner object itself gets
      deleted if that was the only property, and @runner becomes invalid.
      
       ==13818== Invalid read of size 1
       ==13818==    at 0x55EAF4: nm_streq (nm-macros-internal.h:869)
       ==13818==    by 0x55EAF4: _json_team_normalize_defaults (nm-utils.c:5573)
       ==13818==    by 0x566C89: _nm_utils_team_config_set (nm-utils.c:6057)
       ==13818==    by 0x5498A6: _nm_utils_json_append_gvalue (nm-utils-private.h:228)
       ==13818==    by 0x5498A6: set_property (nm-setting-team.c:1622)
       ==13818==  Address 0x182a9330 is 0 bytes inside a block of size 13 free'd
       ==13818==    at 0x4839A0C: free (vg_replace_malloc.c:530)
       ==13818==    by 0x4857868: json_delete_string (value.c:763)
       ==13818==    by 0x4857868: json_delete (value.c:975)
       ==13818==    by 0x4851FA1: UnknownInlinedFun (jansson.h:129)
       ==13818==    by 0x4851FA1: hashtable_do_del (hashtable.c:131)
       ==13818==    by 0x4851FA1: hashtable_del (hashtable.c:289)
       ==13818==    by 0x55DFDD: _json_del_object (nm-utils.c:5384)
       ==13818==    by 0x55EA70: _json_delete_object_on_string_match (nm-utils.c:5532)
       ==13818==    by 0x55EADB: _json_team_normalize_defaults (nm-utils.c:5549)
       ==13818==    by 0x566C89: _nm_utils_team_config_set (nm-utils.c:6057)
       ==13818==    by 0x5498A6: _nm_utils_json_append_gvalue (nm-utils-private.h:228)
       ==13818==    by 0x5498A6: set_property (nm-setting-team.c:1622)
       ==13818==  Block was alloc'd at
       ==13818==    at 0x483880B: malloc (vg_replace_malloc.c:299)
       ==13818==    by 0x4852E8C: lex_scan_string (load.c:389)
       ==13818==    by 0x4852E8C: lex_scan (load.c:620)
       ==13818==    by 0x4853458: parse_object (load.c:738)
       ==13818==    by 0x4853458: parse_value (load.c:862)
       ==13818==    by 0x4853466: parse_object (load.c:739)
       ==13818==    by 0x4853466: parse_value (load.c:862)
       ==13818==    by 0x4853655: parse_json.constprop.7 (load.c:899)
       ==13818==    by 0x48537CF: json_loads (load.c:959)
       ==13818==    by 0x566780: _nm_utils_team_config_set (nm-utils.c:5961)
       ==13818==    by 0x5498A6: _nm_utils_json_append_gvalue (nm-utils-private.h:228)
       ==13818==    by 0x5498A6: set_property (nm-setting-team.c:1622)
      
      Fixes: a5642fd9 ('libnm-core: team: rework defaults management on runner properties')
      (cherry picked from commit 80a3031a)
      3fa39f61
  4. 02 Apr, 2019 2 commits
  5. 31 Mar, 2019 1 commit
    • Beniamino Galvani's avatar
      build: fix searching dlopen in configure · 1fa0914b
      Beniamino Galvani authored
      The 4th argument of AC_SEARCH_LIBS is a list of additional libraries,
      not the name of the variable to hold the result which is always
      ac_cv_search_$function. Also, we should ignore the result when it is
      "none required".
      
      Fixes: 1f2eeb85 ('build: rename $(LIBDL) to $(DL_LIBS) and modify detection')
      (cherry picked from commit bd4957fc)
      1fa0914b
  6. 28 Mar, 2019 4 commits
    • Lubomir Rintel's avatar
      ovs: don't traverse interface through disconnected when the ovsdb entry is removed · 8ec09545
      Lubomir Rintel authored
      Go straight to unmanaged. That's what all the other devices do when
      their backing resources vanish. If the device reached disconnected
      state, an autoconnect check would try to connect it back, in vain.
      
      https://github.com/NetworkManager/NetworkManager/pull/324
      (cherry picked from commit 045b88a5)
      8ec09545
    • Lubomir Rintel's avatar
      ovs-interface: dissociate the link on disconnection · 015ef82e
      Lubomir Rintel authored
      Open vSwitch is the special kid on the block -- it likes to be in charge of
      the link lifetime and so we shouldn't be. This means that we shouldn't be
      attempting to remove the link: we'd just (gracefully) fail anyways.
      
      More importantly, this also means that we shouldn't care if we see the link
      go away. Once the device reaches DISCONNECTED state, its configuration is
      cleaned up and we may already be activating another connection. We shouldn't
      alter the device state when OpenVSwitch decides to drop the old link.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1543557
      https://github.com/NetworkManager/NetworkManager/pull/324
      (cherry picked from commit 3a55ec63)
      015ef82e
    • Lubomir Rintel's avatar
      settings: keep the added connection alive for a bit longer · ebdc37e3
      Lubomir Rintel authored
      Fixes a crash on failed AddAndActivate:
      
        $ ip link set eth0 down
        $ nmcli d conn eth0
        Error: Failed to add/activate new connection: Connection 'eth0' is not available on device eth0 because device has no carrier
        <NetworkManager crashes>
      
        #3  0x000055555558b6c5 in _nm_g_return_if_fail_warning
        #4  0x00005555557008c7 in nm_settings_has_connection
        #5  0x0000555555700e5f in pk_add_cb
        #6  0x0000555555726e30 in pk_call_cb
        #7  0x0000555555726e30 in pk_call_cb
        #8  0x0000555555726e30 in pk_call_cb
        #9  0x00005555555aaea8 in _call_id_invoke_callback
        #10 0x00005555555ab2e8 in _call_on_idle
      
      https://github.com/NetworkManager/NetworkManager/pull/325
      (cherry picked from commit f034f17f)
      ebdc37e3
    • Lubomir Rintel's avatar
      device: fix the slave state change reason on master connection removal · b4359e57
      Lubomir Rintel authored
      If we surprise-remove the master, slaves would immediately attempt to bring
      things up by autoconnecting. Not cool. Policy, however, blocks
      autoconnect if the slaves disconnect due to "dependency-failed", and it
      indeed seems to be an appropriate reason here:
      
        $ nmcli c add type bridge
        $ nmcli c add type dummy ifname dummy0 master bridge autoconnect yes
        $ nmcli c del bridge
        $
      
      Before:
      
        (nm-bridge): state change: ip-config -> deactivating (reason 'connection-removed')
        (nm-bridge): state change: deactivating -> disconnected (reason 'connection-removed')
        (nm-bridge): detached bridge port dummy0
        (dummy0): state change: activated -> disconnected (reason 'connection-removed')
        (nm-bridge): state change: disconnected -> unmanaged (reason 'user-requested')
        (dummy0): state change: disconnected -> unmanaged (reason 'user-requested')
        policy: auto-activating connection 'bridge-slave-dummy0'
      
      After:
      
        (nm-bridge): state change: ip-config -> deactivating (reason 'connection-removed')
        (nm-bridge): state change: deactivating -> disconnected (reason 'connection-removed')
        (nm-bridge): detached bridge port dummy0
        (dummy0): state change: activated -> deactivating (reason 'dependency-failed')
        (nm-bridge): state change: disconnected -> unmanaged (reason 'user-requested')
        (dummy0): state change: deactivating -> disconnected (reason 'dependency-failed')
        (dummy0): state change: disconnected -> unmanaged (reason 'user-requested')
      
      https://github.com/NetworkManager/NetworkManager/pull/319
      (cherry picked from commit 8f2a8a52)
      b4359e57
  7. 26 Mar, 2019 1 commit
  8. 19 Mar, 2019 1 commit
    • Thomas Haller's avatar
      contrib/checkpatch: avoid command injection in checkpatch.pl script · 5e66dcc6
      Thomas Haller authored
      The capture variables, $1, etc, are not valid unless the match
      succeeded, and they're not cleared, either.
      
          $ git checkout -B C origin/master && \
              echo XXXXX > f.txt && \
              git add f.txt && \
              git commit -m 'this commit does something()'
          Branch 'C' set up to track remote branch 'master' from 'origin'.
          Reset branch 'C'
          Your branch is up to date with 'origin/master'.
          sh: -c: line 0: syntax error near unexpected token `('
          sh: -c: line 0: `git log --abbrev=12 --pretty=format:"%h ('%s')" -1 does something() 2>/dev/null'
      
          >>> VALIDATE "a169a98e14 this commit does something()"
          (commit message):4: Commit 'does something()' does not seem to exist:
          > Subject: [PATCH] this commit does something()
      
          (commit message):4: Refer to the commit id properly: :
          > Subject: [PATCH] this commit does something()
      
          The patch does not validate.
      
      (cherry picked from commit d66a1ace)
      5e66dcc6
  9. 15 Mar, 2019 5 commits
  10. 13 Mar, 2019 2 commits
  11. 11 Mar, 2019 12 commits
  12. 08 Mar, 2019 1 commit
  13. 07 Mar, 2019 5 commits