1. 17 Feb, 2017 1 commit
    • Thomas Haller's avatar
      core: use define for atomic-section-prefix setting for NMConfig · 9e5319db
      Thomas Haller authored
      main() should pass the same atomic-section-prefix setting to it's
      NMConfig instances. Currently both are NULL, but make it a define
      to make this explicit.
      
      Also, make static array @default_values const and sanitize value
      when setting PROP_ATOMIC_SECTION_PREFIXES property.
      9e5319db
  2. 16 Feb, 2017 12 commits
  3. 15 Feb, 2017 12 commits
  4. 14 Feb, 2017 6 commits
    • Thomas Haller's avatar
      NEWS: update · 37b659f7
      Thomas Haller authored
      37b659f7
    • Thomas Haller's avatar
      dns: change behavior for "rc-manager=symlink" to preserve "/etc/resolv.conf" as file · 15177a34
      Thomas Haller authored
      The purpose of "rc-manager=symlink" is so that the administrator can point
      the "/etc/resolv.conf" as a symlink to a certain file, and thus indicating
      that a certain component is responsible to manage resolv.conf, while others
      should stay away from it.
      For example, systemd-resolved never touches "/etc/resolv.conf", but
      expects the admin to setup the symlink appropriately. It also recognizes
      whether the symlink points to it's own resolv.conf in /run or to another
      component.
      
      Previously, "rc-manager=symlink" would always replace a regular file
      with a symlink to "/var/run/NetworkManager/resolv.conf". Only if
      "/etc/resolv.conf" is already a symlink somewhere else, NM would not
      touch it. This with the exception that if "/etc/resolv.conf" points to
      "/var/run/NetworkManager/resolv.conf", it would replace the symlink
      with the same link to raise inotify events.
      
      Change behavior so if "/etc/resolv.conf" is already a regular file, keep
      it as file.
      This means, if you have multiple components that don't care, everybody
      can write the "/etc/resolv.conf" (as file) and there is no clear
      expressed responsibility.
      It was wrong that NetworkManager would convert the file to a symlink,
      this should be reserved to the admin. Instead, NetworkManager should
      accept that the intent is unspecified and preserve the regular file.
      It's up to the admin to replace the symlink to somewhere else (to keep
      NM off), or to point it to "/var/run/NetworkManager/resolv.conf", to show
      the explicit intent.
      
      The wrong behavior causes dangling symlinks when somebody disables
      NetworkManager for good.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1367551
      15177a34
    • Thomas Haller's avatar
    • Thomas Haller's avatar
      6aaee976
    • Beniamino Galvani's avatar
      dhcp: dhclient: reset the request list if conf file contains 'request' · f71e1379
      Beniamino Galvani authored
      After commit 2049e97d ("dhcp: refactor parsing of 'request' and
      'also request' options") NM parses all the existing 'request' and
      'also request' from the original configuration file and appends them
      as 'also request' to avoid duplicates and conflicts.
      
      So if the original file contains 'request x' (which means "request
      only option x instead of builtin defaults"), we would translate it
      into 'also request x', which appends the option to the builtin
      defaults, causing duplicates in the DHCP request as dhclient seems not
      smart enough to sanitize the list by itself.
      
      To fix this, ensure that the request list is reset if the
      configuration file contains a 'request'.
      
      Fixes: 2049e97d
      
      https://bugzilla.gnome.org/show_bug.cgi?id=778430
      f71e1379
    • Thomas Haller's avatar
      wifi: introduce enum type NMSupplicantInterfaceState instead of plain int · 5a03de70
      Thomas Haller authored
      Also change the signature of the NM_SUPPLICANT_INTERFACE_STATE signal,
      to have three "int" type arguments. Thereby also fix the subscribers
      to this signal that wrongly had type guint32, instead of guint
      (which happens to be the same underlying type, so no real problem).
      
      https://mail.gnome.org/archives/networkmanager-list/2017-February/msg00021.html
      5a03de70
  5. 13 Feb, 2017 5 commits
  6. 10 Feb, 2017 4 commits
    • Thomas Haller's avatar
      platform: avoid printing "(null)" interface name during logging · ed07de86
      Thomas Haller authored
      Avoids:
      
          platform: link: setting up '(null)' (11)
      
      Use nm_strquote_a() to quote the string if it is not NULL.
      ed07de86
    • Thomas Haller's avatar
      shared: cleanup nm_strquote_a() and nm_sprintf_bufa() · 7e3b47de
      Thomas Haller authored
      - simplify nm_strquote_a().
      
      - use '"' for quoting instad of '\''.
      
      - have nm_sprintf_bufa() evalute @n_elements only once.
      7e3b47de
    • Thomas Haller's avatar
      dns: fix shutdown to restore non-cached DNS config · ecd3263e
      Thomas Haller authored
      The DNS manager and other singletons have the problem that
      they are not properly destroyed on exit, that is, we leak
      most of the instances. That should be eventually fixed and
      all resources/memory should be released.
      
      Anyway, fix the shutdown procedure by adding an explict command
      nm_dns_manager_shutdown(). We should not rely on cleanup actions
      to take place when the last reference is dropped, because then
      we get complex interactions where we must ensure that everybody
      drops the references at the right pointer.
      
      Since the previous shutdown action was effectively never performed,
      it is not quite clear what we actually want to do on shutdown.
      For now, move the code to nm_dns_manager_stop(). We will see if
      that is the desired behavior.
      ecd3263e
    • Thomas Haller's avatar
      platform: use IFA_FLAGS name instead of numeric value · 6ad8011e
      Thomas Haller authored
      Originally, IFA_FLAGS might not have been present in the headers.
      In the mean time, we explicitly define it outself to be "8".
      6ad8011e