1. 11 Jun, 2019 2 commits
    • Thomas Haller's avatar
      all: drop empty first line from sources · 87a73df9
      Thomas Haller authored
        git ls-files -z -- ':(exclude)src/settings/plugins/keyfile/tests/keyfiles' | xargs -0 -n1 sed -i '1 { /^$/d }'
    • Thomas Haller's avatar
      all: drop emacs file variables from source files · c0e075c9
      Thomas Haller authored
      We no longer add these. If you use Emacs, configure it yourself.
      Also, due to our "smart-tab" usage the editor anyway does a subpar
      job handling our tabs. However, on the upside every user can choose
      whatever tab-width he/she prefers. If "smart-tabs" are used properly
      (like we do), every tab-width will work.
      No manual changes, just ran commands:
          F=($(git grep -l -e '-\*-'))
          sed '1 { /\/\* *-\*-  *[mM]ode.*\*\/$/d }'     -i "${F[@]}"
          sed '1,4 { /^\(#\|--\|dnl\) *-\*- [mM]ode/d }' -i "${F[@]}"
      Check remaining lines with:
          git grep -e '-\*-'
      The ultimate purpose of this is to cleanup our files and eventually use
      SPDX license identifiers. For that, first get rid of the boilerplate lines.
  2. 06 Sep, 2018 1 commit
  3. 08 Aug, 2018 1 commit
    • Thomas Haller's avatar
      all: add connection.multi-connect property for wildcard profiles · 55ae6923
      Thomas Haller authored
      Add a new option that allows to activate a profile multiple times
      (at the same time). Previoulsy, all profiles were implicitly
      NM_SETTING_CONNECTION_MULTI_CONNECT_SINGLE, meaning, that activating
      a profile that is already active will deactivate it first.
      This will make more sense, as we also add more match-options how
      profiles can be restricted to particular devices. We already have
      connection.type, connection.interface-name, and (ethernet|wifi).mac-address
      to restrict a profile to particular devices. For example, it is however
      not possible to specify a wildcard like "eth*" to match a profile to
      a set of devices by interface-name. That is another missing feature,
      and once we extend the matching capabilities, it makes more sense to
      activate a profile multiple times.
      See also https://bugzilla.redhat.com/show_bug.cgi?id=997998, which
      previously changed that a connection is restricted to a single activation
      at a time. This work relaxes that again.
      This only adds the new property, it is not used nor implemented yet.
  4. 11 Jul, 2018 1 commit
    • Thomas Haller's avatar
      all: don't use gchar/gshort/gint/glong but C types · e1c7a2b5
      Thomas Haller authored
      We commonly don't use the glib typedefs for char/short/int/long,
      but their C types directly.
          $ git grep '\<g\(char\|short\|int\|long\|float\|double\)\>' | wc -l
          $ git grep '\<\(char\|short\|int\|long\|float\|double\)\>' | wc -l
      One could argue that using the glib typedefs is preferable in
      public API (of our glib based libnm library) or where it clearly
      is related to glib, like during
        g_object_set (obj, PROPERTY, (gint) value, NULL);
      However, that argument does not seem strong, because in practice we don't
      follow that argument today, and seldomly use the glib typedefs.
      Also, the style guide for this would be hard to formalize, because
      "using them where clearly related to a glib" is a very loose suggestion.
      Also note that glib typedefs will always just be typedefs of the
      underlying C types. There is no danger of glib changing the meaning
      of these typedefs (because that would be a major API break of glib).
      A simple style guide is instead: don't use these typedefs.
      No manual actions, I only ran the bash script:
        FILES=($(git ls-files '*.[hc]'))
        sed -i \
            -e 's/\<g\(char\|short\|int\|long\|float\|double\)\>\( [^ ]\)/\1\2/g' \
            -e 's/\<g\(char\|short\|int\|long\|float\|double\)\>  /\1   /g' \
            -e 's/\<g\(char\|short\|int\|long\|float\|double\)\>/\1/g' \
  5. 09 Jan, 2018 2 commits
    • Thomas Haller's avatar
      libnm: rename MDns flag UNKNOWN to DEFAULT · 9d92848a
      Thomas Haller authored
      "UNKNOWN" is not a good name. If you don't set the property
      in the connection explicitly, it should be "DEFAULT".
      Also, make "DEFAULT" -1. For one, that ensures that the enum's
      underlying integer type is signed. Otherwise, it's cumbersome
      to test "if (mdns >= DEFAULT)" because in case of unsigned types,
      the compiler will warn about the check always being true.
      Also, it allows for "NO" to be zero. These are no strong reasons,
      but I tend to think this is better.
      Also, don't make the property of NMSettingConnection a CONSTRUCT property.
      Initialize the default manually in the init function.
      Also, order the numeric values so that DEFAULT < NO < RESOLVE < YES with
      YES being largest because it enables *the most*.
    • Ismo Puustinen's avatar
      mdns: add new connection property. · 2e2ff6f2
      Ismo Puustinen authored
      Add support for mDNS as a connection-level property. Update ifcfg-rh and
      keyfile plugins to support it.
  6. 02 Nov, 2017 1 commit
    • Thomas Haller's avatar
      all: move setting 802-1x.auth-retries to connection.auth-retries · 2730dc60
      Thomas Haller authored
      The number of authentication retires is useful also for passwords aside
      802-1x settings. For example, src/devices/wifi/nm-device-wifi.c also has
      a retry counter and uses a hard-coded value of 3.
      Move the setting, so that it can be used in general. Although it is still
      not implemented for other settings.
      This is an API and ABI break.
  7. 17 Mar, 2017 1 commit
  8. 16 Oct, 2016 1 commit
    • Beniamino Galvani's avatar
      libnm-core: introduce connection.autoconnect-retries property · 51d7a18f
      Beniamino Galvani authored
      While technically it's already possible to implement a fail-over
      mechanism using multiple connections (for example, defining a higher
      priority DHCP connection with short DHCP timeout and a lower priority
      one with static address), in practice this doesn't work well as we try
      to autoactivate each connection 4 times before switching to the next
      Introduce a connection.autoconnect-retries property that can be used
      to change the number of retries. The special value 0 means infinite
      and can be used to try the connection forever. A -1 value means the
      global configured default, which is equal to 4 unless overridden.
  9. 30 Jun, 2016 1 commit
    • Thomas Haller's avatar
      libnm: add NMSettingConnection:stable-id property · 3f3ea1df
      Thomas Haller authored
      This new property be used as token to generate stable-ids instead
      of the connection's UUID.
      Later, this will be used by ipv6.addr-gen-mode=stable-privacy,
      ethernet.cloned-mac-address=stable, and wifi.cloned-mac-address=stable
      setting. Those generate stable addresses based on the connection's
      UUID, but allow to use the stable-id instead.
      This allows multiple connections to generate the same addresses
      -- on the same machine, because in the above cases a machine
      dependant key is also hashed.
  10. 12 Oct, 2015 1 commit
  11. 19 Jun, 2015 1 commit
    • Jiří Klimeš's avatar
      libnm: add autoconnect-slaves property to NMSettingConnection · 6caafab2
      Jiří Klimeš authored
      The property is used for controlling whether slaves should be brought up with
      a master connection. If 0, activating the master will not activate slaves.
      But if set to 1, activating the master will bring up slaves as well.
      The property can have the third state (-1), meaning that the value is default.
      That is either a value set in the configuration file for the property, or 0.
  12. 09 Jun, 2015 1 commit
  13. 28 Oct, 2014 1 commit
    • Dan Winship's avatar
      libnm-core: add nm-core-types.h, remove cross-includes · b1087908
      Dan Winship authored
      Add nm-core-types.h, typedefing all of the GObject types in
      libnm-core; this is needed so that nm-setting.h can reference
      NMConnection in addition to nm-connection.h referencing NMSetting.
      Removing the cross-includes from the various headers causes lots of
      fallout elsewhere. (In particular, nm-utils.h used to include
      nm-connection.h, which included every setting header, so any file that
      included nm-utils.h automatically got most of the rest of libnm-core
      without needing to pay attention to specifics.) Fix this up by
      including nm-core-internal.h from those files that are now missing
  14. 22 Oct, 2014 1 commit
    • Dan Winship's avatar
      libnm-core: merge NMSetting*Error into NMConnectionError · 2d8e7bd2
      Dan Winship authored
      Each setting type was defining its own error type, but most of them
      had exactly the same three errors ("unknown", "missing property", and
      "invalid property"), and none of the other values was of much use
      programmatically anyway.
      So, this commit merges NMSettingError, NMSettingAdslError, etc, all
      into NMConnectionError. (The reason for merging into NMConnectionError
      rather than NMSettingError is that we also already have
      "NMSettingsError", for errors related to the settings service, so
      "NMConnectionError" is a less-confusable name for settings/connection
      errors than "NMSettingError".)
      Also, make sure that all of the affected error messages are localized,
      and (where appropriate) prefix them with the relevant property name.
      Renamed error codes:
      Remapped error codes:
      Dropped error codes (were previously defined but unused):
  15. 12 Oct, 2014 1 commit
  16. 22 Aug, 2014 1 commit
  17. 16 Aug, 2014 1 commit
    • Dan Winship's avatar
      all: fix up multiple-include-guard defines · c81fb49a
      Dan Winship authored
      Previously, src/nm-ip4-config.h, libnm/nm-ip4-config.h, and
      libnm-glib/nm-ip4-config.h all used "NM_IP4_CONFIG_H" as an include
      guard, which meant that nm-test-utils.h could not tell which of them
      was being included (and so, eg, if you tried to include
      nm-ip4-config.h in a libnm test, it would fail to compile because
      nm-test-utils.h was referring to symbols in src/nm-ip4-config.h).
      Fix this by changing the include guards in the non-API-stable parts of
      the tree:
        - libnm-glib/nm-ip4-config.h remains   NM_IP4_CONFIG_H
        - libnm/nm-ip4-config.h now uses     __NM_IP4_CONFIG_H__
        - src/nm-ip4-config.h now uses       __NETWORKMANAGER_IP4_CONFIG_H__
      And likewise for all other headers.
      The two non-"nm"-prefixed headers, libnm/NetworkManager.h and
      src/NetworkManagerUtils.h are now __NETWORKMANAGER_H__ and
      __NETWORKMANAGER_UTILS_H__ respectively, which, while not entirely
      consistent with the general scheme, do still mostly make sense in
  18. 01 Aug, 2014 4 commits
    • Dan Winship's avatar
      libnm: add NetworkManager.h, disallow including individual headers · d0b05b34
      Dan Winship authored
      Add NetworkManager.h, which includes all of the other NM header, and
      require all external users of libnm to use that rather than the
      individual headers.
      (An exception is made for nm-dbus-interface.h,
      nm-vpn-dbus-interface.h, and nm-version.h, which can be included
    • Dan Winship's avatar
      libnm: fix up class struct reserved slots · 2fc55941
      Dan Winship authored
      Add reserved slots to those classes that were missing them (or had run
      out), and sync up the number of slots across classes:
        - 8 slots for "important" classes, abstract base classes, and
          classes we expect we might need to add new virtual methods or
          signals to later.
        - 4 for everything else
      Also, rearrange the class elements in a few places into standard order
      (signals first, then methods).
    • Dan Winship's avatar
      libnm: remove Since tags and NM_AVAILABLE_IN_* attributes · b4ae6eae
      Dan Winship authored
      Everything currently in libnm has always been there.
    • Dan Winship's avatar
      libnm: add libnm/libnm-core (part 1) · d595f784
      Dan Winship authored
      This commit begins creating the new "libnm", which will replace
      libnm-util and libnm-glib.
      The main reason for the libnm-util/libnm-glib split is that the daemon
      needs to link to libnm-util (to get NMSettings, NMConnection, etc),
      but can't link to libnm-glib (because it uses many of the same type
      names as the NetworkManager daemon. eg, NMDevice). So the daemon links
      to only libnm-util, but basically all clients link to both.
      With libnm, there will be only a single client-visible library, and
      NetworkManager will internally link against a private "libnm-core"
      containing the parts that used to be in libnm-util.
      (The "libnm-core" parts still need to be in their own directory so
      that the daemon can see those header files without also seeing the
      ones in libnm/ that conflict with its own headers.)
      [This commit just copies the source code from libnm-util/ to
      libnm-core/, and libnm-glib/ to libnm/:
        mkdir -p libnm-core/tests/
        mkdir -p libnm/tests/
        cp libnm-util/*.[ch] libnm-util/nm-version.h.in libnm-core/
        rm -f libnm-core/nm-version.h libnm-core/nm-setting-template.[ch] libnm-core/nm-utils-enum-types.[ch]
        cp libnm-util/tests/*.[ch] libnm-core/tests/
        cp libnm-glib/*.[ch] libnm/
        rm -f libnm/libnm_glib.[ch] libnm/libnm-glib-test.c libnm/nm-glib-enum-types.[ch]
        cp libnm-glib/tests/*.[ch] libnm/tests/
  19. 15 Jul, 2014 2 commits
    • Dan Winship's avatar
      libnm-util, libnm-glib: whitespace fixes · 2570c5a1
      Dan Winship authored
      Fix indentation, kill trailing whitespace, split some long lines.
    • Dan Winship's avatar
      libnm-util, libnm-glib: standardize copyright/license headers · cb7e1893
      Dan Winship authored
      - Remove list of authors from files that had them; these serve no
        purpose except to quickly get out of date (and were only used in
        libnm-util and not libnm-glib anyway).
      - Just say "Copyright", not "(C) Copyright" or "Copyright (C)"
      - Put copyright statement after the license, not before
      - Remove "NetworkManager - Network link manager" from the few files
        that contained it, and "libnm_glib -- Access network status &
        information from glib applications" from the many files that
        contained it.
      - Remove vim modeline from nm-device-olpc-mesh.[ch], add emacs modeline
        to files that were missing it.
  20. 28 Feb, 2014 1 commit
  21. 13 Feb, 2014 1 commit
    • Dan Winship's avatar
      libnm-util, libnm-glib: add versioned deprecation/availability macros · 9c4d86ee
      Dan Winship authored
      Add versioned NM_DEPRECATED_IN_* and NM_AVAILABLE_IN_* macros, and tag
      new/deprecated functions accordingly. (All currently-deprecated
      functions are assumed to have been deprecated in 0.9.10.)
      can be set to determine which versions will cause warnings.
      With the current settings, external consumers of the
      libnm-util/libnm-glib APIs will have MIN_REQUIRED and MAX_ALLOWED both
      set to NM_VERSION_0_9_8 by default, meaning they will get warnings
      about functions added in 0.9.10. NM internally sets
      always allowed to use all APIs.
  22. 21 Jun, 2013 1 commit
    • Dan Williams's avatar
      libnm-util: add gateway-ping-timeout property to connection setting · 00203a87
      Dan Williams authored
      To better handle broken hardware, like switches which don't pass
      traffic for a few seconds after a carrier has been negotiated,
      add a timeout to control how long to wait for successful pings
      of the gateway before giving up and proceeding with IP config.
      Default is 0, which means don't ping the gateway, just assume
      the NIC/switch aren't lying and can pass traffic immediately.
  23. 13 Mar, 2013 1 commit
  24. 21 Sep, 2012 1 commit
  25. 27 Jul, 2012 1 commit
  26. 02 Jul, 2012 1 commit
  27. 12 Mar, 2012 1 commit
    • Dan Winship's avatar
      Fix names of error enum values · 54ef8f32
      Dan Winship authored
      When NM was registering all of its enum types by hand, it was using
      NamesLikeThis rather than the default names-like-this for the "nick"
      values. When we switched to using glib-mkenums, this resulted in
      dbus-glib using different strings for the D-Bus error names, causing
      compatibility problems.
      Fix this by using glib-mkenums annotations to manually fix all the
      enum values back to what they were before. (This can't be done in a
      more automated way, because the old names aren't 100% consistent. Eg,
      "UNKNOWN" frequently becomes "UnknownError" rather than just
  28. 15 Feb, 2012 1 commit
    • Dan Winship's avatar
      Use glib-mkenums to generate enum types · 839eab55
      Dan Winship authored
      Rather than generating enum classes by hand (and complaining in each
      file that "this should really be standard"), use glib-mkenums.
      Unfortunately, we need a very new version of glib-mkenums in order to
      deal with NM's naming conventions and to fix a few other bugs, so just
      import that into the source tree temporarily.
      Also, to simplify the use of glib-mkenums, import Makefile.glib from
      To avoid having to run glib-mkenums for every subdirectory of src/,
      add a new "generated" directory, and put the generated enums files
      Finally, use Makefile.glib for marshallers too, and generate separate
      ones for libnm-glib and NetworkManager.
  29. 10 Nov, 2011 2 commits
    • Thomas Graf's avatar
      bonding: implement bonding slaves · 6349151d
      Thomas Graf authored
      Adds a MASTER= directive to ifcfg-rh allowing a connection to define
      itself as bonding slave.
      Adds a connection property "master" which contains the in-kernel device
      name or UUID of the master connection.
      Adds a connection property "slave-type" which defines the type of slave
      this connection represents. Currently this is only set by bonding but
      eventually this will be used by VLAN and bridging.
      Enforces that no bonding slave connection has any IPv4 or IPv6
      configuration set.
      Changes make_ip4_setting() to take a universal flag indicating whether
      to allow disabling ip4 config or not and use it for both, ip6 and
      bonding special case.
      Signed-off-by: default avatarThomas Graf <tgraf@redhat.com>
    • Jiri Popelka's avatar
      libnm-util: new 'zone' property for NMSettingConnection · 04c8ec73
      Jiri Popelka authored
      Used to indicate what firewall zone the interface should be in
      when the connection is active.
  30. 08 Feb, 2011 1 commit
  31. 07 Feb, 2011 1 commit
  32. 18 Nov, 2010 1 commit
  33. 03 Nov, 2010 1 commit