1. 28 May, 2013 6 commits
    • Dan Williams's avatar
      ifnet: track connections by UUID not conf.d net connection name · 689dadaf
      Dan Williams authored
      We'll need this for later with unsaved connections.  The ifnet
      plugin previously tracked connections by the "conn_name" which
      was derived from keys in the /etc/conf.d/net file.  These keys
      take two forms:
      
      1) interface name
      
      config_eth0=(
      "192.168.4.121/24"
      "dhcp6"
      )
      
      2) wifi SSID, either text or hex-encoded:
      
      config_myssid=("dhcp")
      config_0xab3ace=("dhcp")
      
      The conf.d net connection name is apparently usually an interface
      name, so when writing to /etc/conf.d/net the NM connection name is
      changed from eg "Ethernet connection 1" to the next available
      interface name based on the type of connection, eg "eth0".
      
      The ifnet plugin actively removed connections that were not present
      in /etc/conf.d/net during the reload_connections() call, but in the
      future we'll want to allow unsaved connections which in the case of
      ifnet clearly won't yet be written to the file.  Since only
      connections written to the file have a "conn_name", tracking
      connections by conn_name no longer works.
      689dadaf
    • Dan Williams's avatar
    • Dan Williams's avatar
      ifcfg-rh: track connections by UUID not file path · b225a9f5
      Dan Williams authored
      We'll need this for later with unsaved connections.
      b225a9f5
    • Dan Williams's avatar
    • Dan Williams's avatar
      keyfile: track connections by UUID not file path · 830f65fc
      Dan Williams authored
      We'll need this for later with unsaved connections.
      830f65fc
    • Dan Williams's avatar
      settings: track whether connection is saved to disk or not · cd5d9270
      Dan Williams authored
      Use the new NMConnection 'changed' signal to mark connections
      as dirty/unsaved, and reset that when they get flushed to disk.
      Previously, the 'Updated' signal was emitted only when the
      connection was changed and flushed to disk, but now we have
      more granular needs, and the signal is emitted whenever the
      connection actually *is* changed, regardless of whether its
      flushed to disk or not.
      cd5d9270
  2. 20 May, 2013 2 commits
  3. 18 May, 2013 1 commit
  4. 14 May, 2013 3 commits
    • Dan Williams's avatar
      ifupdown: recalculate unmanaged specs on interface change (debian #707070) · f762fa58
      Dan Williams authored
      If a kernel interface changes its MAC address, and NM is not
      supposed to manage that interface, ifupdown needs to notice
      that MAC address change and tell NM that the unmanaged devices
      have changed, so that NM continues to not touch the device
      after the MAC has changed.
      f762fa58
    • Dan Williams's avatar
      ifupdown: fix naming confusion in plugin hash tables · a3705112
      Dan Williams authored
      well_known_interfaces -> eni_ifaces, since it's a hash of any
      interfaces read from /etc/network/interfaces.
      
      well_known_ifaces -> kernel_ifaces, since it's a hash of any
      network subsystem interface the kernel knows about
      a3705112
    • Dan Williams's avatar
      ifupdown: clarify name of connections hash · b2c67096
      Dan Williams authored
      'iface_connections' is really the list of all NMIfupdownConnections
      known to the plugin, read from /e/n/i and hashed by block name.  Since
      ifupdown doesn't store anything *except* connections from /e/n/i,
      just rename it to 'connections' to reduce confusion with the
      well_known_interfaces and well_known_ifaces hashes.
      b2c67096
  5. 08 May, 2013 3 commits
    • Dan Winship's avatar
      core: move devices into a subdirectory · 3ab82ea2
      Dan Winship authored
      We have lots of device types and will soon have lots more, so let's
      put them in their own directory.
      3ab82ea2
    • Dan Winship's avatar
      core: use non-recursive build · c4417c71
      Dan Winship authored
      Although having different parts of NM in different subdirectories
      keeps the source tree neat, it has made the build messy, particularly
      because of cross-dependencies between the subdirs.
      
      Reorganize to build all of the pieces of the NetworkManager binary
      from src/Makefile, and only use recursive make for test programs,
      helper binaries, and plugins.
      
      As part of this, get rid of all the per-directory convenience
      libraries, and switch to building a single top-level
      libNetworkManager.la, containing everything except main.c, which all
      of the test programs can then link against.
      c4417c71
    • Dan Winship's avatar
      libnm-glib, core: use g_cclosure_marshal_generic · d529580c
      Dan Winship authored
      Since we depend on new glib now, we can just use the generic
      marshaller rather than generating our own.
      d529580c
  6. 03 May, 2013 1 commit
  7. 19 Apr, 2013 1 commit
    • Martin Pitt's avatar
      Use %NULL macro in doc strings · 57a9fb3c
      Martin Pitt authored
      Mass-converted "NULL" to "%NULL" in docstrings with
      
        find -name '*.c'| xargs sed -i '/^ \*.*[^%]NULL/ s/NULL\b/%NULL/g'
      57a9fb3c
  8. 18 Apr, 2013 1 commit
  9. 17 Apr, 2013 1 commit
  10. 11 Apr, 2013 3 commits
    • Dan Williams's avatar
      keyfile: ensure all-default VLAN setting is read correctly · 9f8b7ff5
      Dan Williams authored
      Settings with all-default values are not written to reduce
      complexity of the keyfile (and be more human-readable friendly)
      and that includes VLAN settings with a VLAN ID of zero.  So
      when reading this file back, if there is no 'base type' setting
      (eg, the setting specified by the connection::type property)
      then just add that setting.  nm_connection_verify() will catch
      cases where an empty 'base type' setting is invalid.
      9f8b7ff5
    • Dan Winship's avatar
      settings: consider :interface-name in default wired connection matching · f1d31e36
      Dan Winship authored
      The code to check if an ethernet device had a matching connection was
      not taking NMSettingConnection:interface-name into account, meaning it
      might think a device had a matching connection when that connection
      actually only matched a different device.
      
      Fix this by calling nm_setting_connection_get_interface_name() rather
      than nm_connection_get_virtual_iface_name() (which would always be
      NULL for ethernet connections anyway).
      
      Also, simplify the code a bit.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=696722
      f1d31e36
    • Dan Williams's avatar
      keyfile: use 'ethernet', 'wifi' and 'wifi-security' group names (bgo #696940) · c36200a2
      Dan Williams authored
      Add these aliases for the setting names '802-3-ethernet',
      '802-11-wireless', and '802-11-wireless-security' and write them by
      default.  It's much friendlier for administrators to type, and a lot
      less ugly.
      
      Also works for:
      
      [connection]
      type=ethernet
      c36200a2
  11. 10 Apr, 2013 1 commit
  12. 08 Apr, 2013 11 commits
  13. 05 Apr, 2013 1 commit
    • Dan Williams's avatar
      keyfile: fix testcase comparison · 1bcf3f63
      Dan Williams authored
      test-keyfile.c: In function 'test_read_string_ssid':
      test-keyfile.c:1154:51: error: argument to 'sizeof' in 'memcmp' call is the
         same expression as the second source; did you mean to provide an explicit
         length? [-Werror=sizeof-pointer-memaccess]
      ASSERT (memcmp (array->data, expected_ssid, sizeof (expected_ssid)) == 0,
      1bcf3f63
  14. 03 Apr, 2013 4 commits
    • Dan Winship's avatar
      Revert :carrier-detect properties and associated code · 5fec30d9
      Dan Winship authored
      Ignoring carrier is generally something you want at the machine level
      (eg, for a server), not at the connection level.
      5fec30d9
    • Dan Winship's avatar
      settings: use NMConfig directly rather than reparsing NetworkManager.conf · 0186330a
      Dan Winship authored
      Add some new API to NMConfig so that NMSettings and its plugins can
      use NMConfig to look up values rather than reparsing the config file
      themselves.
      
      Also, move the no-auto-default cache from NetworkManager.conf to
      $NMSTATEDIR/no-auto-default.state, so NM isn't rewriting its own
      config file at runtime.
      0186330a
    • Dan Winship's avatar
      settings: clarify that NMDefaultWiredConnection is ethernet-only · 57b0ed41
      Dan Winship authored
      NMSettings would try to create an NMDefaultWiredConnection for any
      NMDeviceWired subclass, and there was some code to deal with
      InfiniBand in the code. But nm_default_wired_connection_new() required
      the hwaddr length to be ETH_ALEN, so InfiniBand would never have
      worked (and probably shouldn't have, since people generally don't want
      the auto-default behavior on servers anyway). And we certainly never
      intended for this code to apply to bridges and bonds. So fix it to
      only apply to ethernet devices, and remove the vestigial
      InfiniBand-related code.
      57b0ed41
    • Dan Winship's avatar
      settings: don't pass config_path to NMSettings and settings plugins · b3e8361f
      Dan Winship authored
      They can just call nm_config_get() now to get the config, and
      nm_config_get_path() to get its path.
      b3e8361f
  15. 28 Mar, 2013 1 commit