1. 31 Oct, 2017 1 commit
  2. 17 Aug, 2017 1 commit
  3. 19 Apr, 2017 1 commit
  4. 18 Apr, 2017 1 commit
  5. 06 Feb, 2017 1 commit
    • Thomas Haller's avatar
      build: fix -Wignored-qualifiers warnings · e68cc17f
      Thomas Haller authored
          ./src/nm-config-data.h:163:1: error: 'const' type qualifier on return type has no effect [-Werror,-Wignored-qualifiers]
          const guint nm_config_data_get_connectivity_interval (const NMConfigData *config_data);
  6. 25 Nov, 2016 1 commit
    • Thomas Haller's avatar
      config: optionally let nm_config_get_plugins() return compile time default · 6689d0bf
      Thomas Haller authored
      Instead of having the caller do the fallback to the compile time default
      plugins, let it be handled by nm_config_get_plugins().
      The knowledge of fallback to a compile time default (and how to do that
      properly) should be inside NMConfig/NMConfigData alone.
      Also, as this function is only called once, let NMConfig not cache
      the string list but create it once as needed.
  7. 04 Oct, 2016 1 commit
    • Thomas Haller's avatar
      core: refactor private data in "src" · 4d37f7a1
      Thomas Haller authored
      - use _NM_GET_PRIVATE() and _NM_GET_PRIVATE_PTR() everywhere.
      - reorder statements, to have GObject related functions (init, dispose,
        constructed) at the bottom of each file and in a consistent order w.r.t.
        each other.
      - unify whitespaces in signal and properties declarations.
      - use NM_GOBJECT_PROPERTIES_DEFINE() and _notify()
      - drop unused signal slots in class structures
      - drop unused header files for device factories
  8. 30 Jun, 2016 1 commit
    • Thomas Haller's avatar
      config: add support for per-device configuration to NetworkManager.conf · 3cda2df1
      Thomas Haller authored
      Add a new [device*] section to NetworkManager.conf. This works similar
      like the default connection settings in [connection*].
      This will allow us to express per-device configuration in NetworkManager.conf
      in our familar style.
      Later, via NMConfig's write API it will be possible to make settings
      accessible via D-Bus and persist them in NetworkManager-intern.conf.
      This way, the user can both edit configuration snippets and modify
      them via D-Bus, and also support installing default configuration
      from the package.
      In a way, a [device*] setting is similar to networkd's link files.
      The match options is all encoded in the match-device specs.
      One difference is, that the resulting setting can be merged together
      by multiple section by partially overwriting them. This makes it
      more flexible and allows for example to drop a configuration snippet
      that only sets one property, while the rest can be merged from different
  9. 01 Jun, 2016 3 commits
    • Thomas Haller's avatar
      config: cleanup includes · 2c411e90
      Thomas Haller authored
    • Thomas Haller's avatar
      config,dns: support Reload flags to specify that only parts should be reloaded · 0acee972
      Thomas Haller authored
      Support 3 new flags for Reload:
        - 0x01 (CONF): reload the configuration from disk
        - 0x02 (DNS_RC): write DNS configuration to resolv.conf
        - 0x04 (DNS_FULL): restart DNS plugin
      Omitting all flags is the same as reloading everything, thus SIGHUP.
    • Thomas Haller's avatar
      config: refactor change-flags to be a cause/reason which triggered the change · eb6140a7
      Thomas Haller authored
      For the most part, this patch just renames some change-flags, but
      doesn't change much about them. The new name should better express
      what they are.
      A config-change signal can be emitted for different reasons:
      when we receive a signal (SIGHUP, SIGUSR1, SIGUSR2) or for internal
      reasons like resetting of no-auto-default or setting internal
      Depending on the reason, we want to perform different actions.
      For example:
       - we reload the configuration from disk on SIGHUP, but not for
       - For SIGUSR1 and SIGHUP, we want to update-dns, but not for SIGUSR2.
      Another part of the change-flags encodes which part of the configuration
      actually changed. Often, these parts can only change when re-reading
      from disk (e.g. a SIGUSR1 will not change any configuration inside
      Later, we will have more causes, and accordingly more fine-grained
      effects of what should be done on reload.
  10. 22 Nov, 2015 1 commit
  11. 01 Oct, 2015 3 commits
  12. 05 Aug, 2015 1 commit
  13. 24 Jul, 2015 1 commit
    • Dan Winship's avatar
      all: rename nm-glib-compat.h to nm-glib.h, use everywhere · 3452ee2a
      Dan Winship authored
      Rather than randomly including one or more of <glib.h>,
      <glib-object.h>, and <gio/gio.h> everywhere (and forgetting to include
      "nm-glib-compat.h" most of the time), rename nm-glib-compat.h to
      nm-glib.h, include <gio/gio.h> from there, and then change all .c
      files in NM to include "nm-glib.h" rather than including the glib
      headers directly.
      (Public headers files still have to include the real glib headers,
      since nm-glib.h isn't installed...)
      Also, remove glib includes from header files that are already
      including a base object header file (which must itself already include
      the glib headers).
  14. 14 Jul, 2015 1 commit
    • Thomas Haller's avatar
      config: add nm_config_data_get_value_cached() function · aa54d5a3
      Thomas Haller authored
      nm_config_data_get_value() returns an allocated string. This is inconvenient
      for the caller. Add a utility function nm_config_data_get_value_cached() that
      caches the returned value. Of course, use with care as the returned string
      will be invalidated by each call to nm_config_data_get_value_cached().
  15. 02 Jul, 2015 8 commits
    • Thomas Haller's avatar
      config: add write support to atomic-sections · 40c57fa7
      Thomas Haller authored
      We already support setting configuration values, either:
       (1) set any internal section, i.e. groups starting with [.intern*].
           Those values don't ever interfere with that the user can
       (2) set individual properties that overwrite user configuration.
           When doing that, we record the value from user configuration
           and on load, we reject our internal overwrite if the user
           configuration changed in the meantime.
           This is done by storing the values with ".set." and ".was." prefixes.
      Now add support for "atomic sections". In this case, certain groups
      can be marked as "atomic". When writing to such sections, we overwrite
      the entire user-provided setting.
      We also record the values from user configuration, and reject our
      internal value if we notice modifications. This basically extends
      (2) from individual properties to the entire section.
    • Thomas Haller's avatar
      config: add write support for NMConfig · 947fc9a2
      Thomas Haller authored
      Internal configuration is written as keyfile to
      Basically, the content of this file is merged with user
      configuration from "NetworkManager.conf" files. After loading
      the configuration, NMConfig exposes a merged view of user-provided
      settings and internal overwrites.
      All sections/groups named [.intern*] are reserved for internal
      configuration values. They can be written by API, but are ignored
      when the user sets them via "NetworkManager.conf". For these
      internal sections, no conflicts can arise.
      We can also overwrite individual properties from user configuration.
      In this case, we store the value we want to set, but also remember
      the value that the user configuration had, at the time of setting.
      If on a later reload the user configuration changed, we ignore our
      internal value -- as we assume that the user modified the value
      We can also hide/delete value from user configuration.
      This works on a per-setting basis.
    • Thomas Haller's avatar
      config: add NMConfigGetValueFlags argument to nm_config_data_get_value() · d3e21937
      Thomas Haller authored
      In some cases we want the returned value to be stripped. In some cases,
      we want to read the raw value instead of the string parsed by GKeyFile.
      Add an flags argument to nm_config_data_get_value(). It is up to the caller
      to determine the exact meaning (and whether to strip).
      By adding the flags argument, the caller can get the desired behavior easier
      without having to workaround it afterwards. But more importantly, it becomes
      apparent that there are different ways to retrieve the value and the caller
      should decide on the details.
    • Thomas Haller's avatar
      config: add config utility accessors · 11c0e107
      Thomas Haller authored
    • Thomas Haller's avatar
    • Thomas Haller's avatar
    • Thomas Haller's avatar
      config: get rid of @Error argument to nm_config_data_get_value() · a5f7abb8
      Thomas Haller authored
      We don't use this argument. A failure to retrieve a key is (for
      every practical purpose) the same as no such key.
    • Thomas Haller's avatar
      config: fix evaluation of no-auto-default setting · 3e445865
      Thomas Haller authored
      We used to merge the spec list for no-auto-default from keyfile with the
      content of the state file. Since the addition of the "except:" spec this
      is wrong.
      For example, if the user configured:
      and statefile contained "11:11:11:11:11" and "22:22:22:22:22", we would
      wrongly not match "11:11:11:11:11". The two lists must be kept separate,
      so that devices that are blocked by internal decision always match.
      This separation is also clearer. Now the spec list is devided into a
      part that comes from user configuration, and a part that comes from
      internal decision.
  16. 25 Jun, 2015 1 commit
  17. 05 Jun, 2015 1 commit
  18. 02 Jun, 2015 1 commit
    • Beniamino Galvani's avatar
      device: don't assume by default IPv6LL-only connections · 3bc097b0
      Beniamino Galvani authored
      Add the new configuration option 'assume-ipv6ll-only' which specifies
      the devices for which NM will try to assume an existing IPv6LL-only
      The new default behavior is to ignore such configurations since IPv6LL
      addresses are automatically assigned by the kernel when the device is
      brought up and thus the presence of an IPv6LL address doesn't mean
      that the device was configured by the administrator.
      The previous behavior was to always assume IPv6LL-only configurations
      but this often had the unwanted effect of preventing other on-disk
      configurations to be activated. To preserve the old behavior the
      option must be set to '*'.
  19. 05 May, 2015 1 commit
  20. 04 May, 2015 1 commit
    • Beniamino Galvani's avatar
      dns: allow runtime selection of resolv.conf manager · e573977b
      Beniamino Galvani authored
      Add a new 'rc-manager' configuration parameter that allows to select
      the strategy used to write resolv.conf; currently supported values
      are: none|resolvconf|netconfig, 'none' meaning that NM directly writes
      the file.
      The default value of the parameter is 'none'; however if a
      RESOLVCONF_PATH (or NETCONFIG_PATH) is specified at build time, the
      default value will be 'resolvconf' (or 'netconfig').
  21. 25 Feb, 2015 1 commit
  22. 03 Feb, 2015 7 commits