1. 28 May, 2013 1 commit
    • Dan Williams's avatar
      settings: implement ability to add connections without saving them to disk · 8a79fb1d
      Dan Williams authored
      We don't always want to immediately write new connections to disk, to
      facilitate "runtime" or "temporary" connections where an interface's
      runtime config isn't backed by on-disk config.  Also, just because
      an interface's configuration is changed doesn't necessarily mean
      that new configuration should be written to disk either.
      
      Add D-Bus methods for adding new connections and for updating existing
      connections that don't immediately save the connection to disk.
      
      Also add infrastructure to indicate to plugins that the new connection
      shouldn't be immediately saved if the connection was added with the
      new method.
      8a79fb1d
  2. 20 May, 2013 2 commits
  3. 08 May, 2013 2 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
  4. 11 Apr, 2013 1 commit
  5. 08 Apr, 2013 7 commits
  6. 03 Apr, 2013 3 commits
    • 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
  7. 07 Mar, 2013 1 commit
  8. 13 Feb, 2013 2 commits
    • Dan Winship's avatar
      all: remove more pointless NULL checks · 08f04466
      Dan Winship authored
      GObject creation cannot normally fail, except for types that implement
      GInitable and take a GError in their _new() method. Some NM types
      override constructor() and return NULL in some cases, but these
      generally only happen in the case of programmer error (eg, failing to
      set a mandatory property), and so crashing is reasonable (and most
      likely inevitable anyway).
      
      So, remove all NULL checks after calls to g_object_new() and its
      myriad wrappers.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=693678
      08f04466
    • Dan Winship's avatar
      all: remove pointless NULL checks · d04f2863
      Dan Winship authored
      g_malloc(), etc, never return NULL, by API contract. Likewise, by
      extension, no other glib function ever returns NULL due to lack of
      memory. So remove lots of unnecessary checks (the vast majority of
      which would have immediately crashed had they ever run anyway, since
      g_set_error(), g_warning(), and nm_log_*() all need to allocate
      memory).
      
      https://bugzilla.gnome.org/show_bug.cgi?id=693678
      d04f2863
  9. 11 Feb, 2013 1 commit
    • Dan Williams's avatar
      settings: load keyfile plugin even if no plugins are given · e5f8b426
      Dan Williams authored
      If no config file was specified, and if no other plugins were given
      on the command-line, the keyfile plugin would not be loaded.  This
      meant no connections would be read, and no connections could be
      created either.
      
      Always load the keyfile plugin.
      e5f8b426
  10. 24 Jan, 2013 1 commit
  11. 26 Sep, 2012 1 commit
    • Dan Winship's avatar
      all: Don't use ctype.h macros · 6878d20a
      Dan Winship authored
      The ctype macros (eg, isalnum(), tolower()) are locale-dependent. Use
      glib's ASCII-only versions instead.
      
      Also, replace isascii() with g_ascii_isprint(), since isascii()
      accepts control characters, which isn't what the code wanted in any of
      the places where it was using it.
      6878d20a
  12. 20 Sep, 2012 1 commit
    • Dan Williams's avatar
      core: determine whether connection timestamps are set or not · 1966aba8
      Dan Williams authored
      Currently there's no way to differentiate between a connection that has
      never been activated, and a connection that has never been *successfully*
      activated.  In both cases nm_settings_connection_get_timestamp() returns
      zero.  But it's useful to know whether a connection hasn't even been
      tried yet, so enhance the timestamp code to return whether or not the
      timestamp has been found in the timestamp cache or not, and make the
      NMDevice core set an explict timestamp of 0 if the connection failed
      on the first attempt.
      
      We'll use this later to conditionally autoconnect WiFi connections
      depending on whether they've ever successfully connected or not, but
      still allow preloaded connections without a timestamp to autoconnect
      as they always have.
      1966aba8
  13. 10 Jul, 2012 1 commit
  14. 18 May, 2012 1 commit
    • Pantelis Koukousoulas's avatar
      adsl: carrier handling and PPPoA support · 9039c24b
      Pantelis Koukousoulas authored
      This is the "juice" of the patch series. Initial cut at carrier handling
      (by polling /sys/class/atm/$iface/carrier) and also support for calling
      pppd with the proper command-line to achieve a connection.
      
      Also implement the necessary boilerplate for the NM state machine to
      be happy with our device.
      
      This is a "duct tape and gum" implementation, i.e., prefer copy&paste
      over proper refactoring, due to limited time, but the foundations are
      now there, so we can make it work right slowly-slowly :)
      
      With this patch, you can already test carrier management but not yet
      make a complete connection.
      
      Relevant extract from logs:
      <info> (ueagle-atm0): carrier now ON (device state 20)
      <info> (ueagle-atm0): device state change: unavailable -> disconnected (reason 'carrier-changed') [20 30 40]
      Signed-off-by: default avatarPantelis Koukousoulas <pktoss@gmail.com>
      9039c24b
  15. 14 May, 2012 1 commit
  16. 02 May, 2012 1 commit
    • Dan Williams's avatar
      core: add connection provider interface · 4fe48b12
      Dan Williams authored
      Allows better encapsulation of the functionality of the NMSettings
      object that we want to expose to the device class.  They don't need
      the whole object so to keep things simple and contained we'll just
      give them a smaller interface to use.
      4fe48b12
  17. 23 Mar, 2012 1 commit
  18. 16 Mar, 2012 1 commit
    • Dan Williams's avatar
      wifi: disable Ad-Hoc WPA connections (lp:905748) · 69247a00
      Dan Williams authored
      The kernel is broken for Ad-Hoc WPA, and creates the connections
      as open connections instead.  Yeah, eventually we can use
      wpa_supplicant with RSN support, but for now we just have to
      disable Ad-Hoc WPA because it's a problem to say we're creating
      a protected network but then have the kernel not do that for
      us.  Will be re-enabled once all the necessary bits have been
      fixed.
      
      Note that Ad-Hoc WPA has been broken since at least 2.6.32 with
      mac80211-based drivers, which is what most users will be using.
      69247a00
  19. 23 Feb, 2012 1 commit
  20. 09 Feb, 2012 1 commit
  21. 08 Dec, 2011 1 commit
    • Thomas Graf's avatar
      bonding: add nm_connection_get_virtual_iface_name() to abstract kernel interface binding · 1cd8d520
      Thomas Graf authored
      Some connection types such as bonding, bridging and VLAN require
      specific virtual kernel interfaces identified by name to be auto
      connected to the connection.
      
      The function nm_connection_get_virtual_iface_name() returns the name
      of the kernel interface if the connection type requires this
      functionatlity.
      
      Each connection base type settings class can implement the function
      get_virtual_iface_name() if the connection needs to be auto connected
      to a specific kernel interface.
      Signed-off-by: default avatarThomas Graf <tgraf@redhat.com>
      1cd8d520
  22. 06 Dec, 2011 1 commit
  23. 02 Dec, 2011 1 commit
  24. 16 Nov, 2011 1 commit
  25. 15 Nov, 2011 1 commit
  26. 10 Nov, 2011 1 commit
  27. 27 Sep, 2011 1 commit
  28. 21 Sep, 2011 1 commit
    • Dan Williams's avatar
      settings: fix refcounting when deleting a default wired connection (lp:797868) · 512a0f82
      Dan Williams authored
      When a default wired connection is saved, it gets deleted first since it
      has to be re-created using a settings plugin.  But with the settings
      rework in 0.9, default wired refcounting changed and the default
      wired connection wasn't kept alive in default_wired_try_update()
      over the removal/readd.  This caused a use-after-free.
      512a0f82
  29. 01 Jul, 2011 1 commit
    • Jiří Klimeš's avatar
      core: connections failed due to missing secrets are re-tried when an secret... · 69b767bb
      Jiří Klimeš authored
      core: connections failed due to missing secrets are re-tried when an secret agent registers (rh #706204)
      
      Use case:
      A user has an auto-activatable connection with secrets in a keyring. While
      booting NM starts and tries to activate the connection, but it fails because of
      missing secrets. Then the user logs in, but the connection is marked as invalid
      and is not tried again.
      
      This commit solves the issue by removing invalid flag and activating the
      connection when a secret agent registers.
      Signed-off-by: default avatarJiří Klimeš <jklimes@redhat.com>
      69b767bb