1. 30 Apr, 2018 1 commit
  2. 16 Mar, 2017 4 commits
    • Thomas Haller's avatar
      core/dispatcher: pass act-request to device dispatcher calls · 3ce6cbb4
      Thomas Haller authored
      Currently, we determine NMD_CONNECTION_PROPS_EXTERNAL based
      on the settings connection. That is not optimal, because whether
      a connection is assumed or externally managed, should be really a
      property of the active-connection. So, in the this will change soon
      and we would need yet another argument to nm_dispatcher_call().
      
      Instead, drop the settings-connection and applied-connection
      arguments and fetch them from the device as needed (but allow
      to pass a specific act-request argument to explicitly state
      which active connection to use).
      
      Also, rename nm_dispatcher_call() to nm_dispatcher_call_device(),
      it this is not a generic dispatcher call, but it is particularly
      related to device events. Likewise, rename nm_dispatcher_call_sync()
      to nm_dispatcher_call_device_sync().
      3ce6cbb4
    • Thomas Haller's avatar
      core/dispatcher: cleanup nm_dispatcher_call_connectivity() · 8987de7c
      Thomas Haller authored
      Remove the redundant action argument. It is clear, that
      nm_dispatcher_call_connectivity() is called with action
      NM_DISPATCHER_ACTION_CONNECTIVITY_CHANGE.
      
      On the other hand, add the async callbacks. Altough they are
      not used at the moment, it seems more correct that an async
      API has a callback and a call-id to cancel the invocation.
      8987de7c
    • Thomas Haller's avatar
    • Thomas Haller's avatar
      core/trivial: give names in src/nm-dispatcher.h header an "NM" prefix · 2b72cc26
      Thomas Haller authored
      Stuff defined in header files should have an NM prefix, although
      this is a project-internal header.
      
      Rename.
      2b72cc26
  3. 04 Oct, 2016 1 commit
    • Atul Anand's avatar
      src: Fixes to add Proxy Feature · 86d4573b
      Atul Anand authored
      src: Fixes in nm-device.c and nm-vpn-connection.c to update PacRunner
      at the right place and moment. When a device goes up PacRunner is
      configured with the Device IPxConfigs and Proxy Config. When it goes
      down the same configuration is removed from PacRunner.
      
      ifcfg-rh: Fixed to read and write proxy settings to the ifcfg network
      scripts.
      86d4573b
  4. 17 Aug, 2016 2 commits
    • Thomas Haller's avatar
      all: cleanup includes in header files · 0bdcab10
      Thomas Haller authored
      - don't include "nm-default.h" in header files. Every source file must
        include as first header "nm-default.h", thus our headers get the
        default include already implicitly.
      
      - we don't support compiling NetworkManager itself with a C++ compiler. Remove
        G_BEGIN_DECLS/G_END_DECLS from internal headers. We do however support
        users of libnm to use C++, thus they stay in public headers.
      
      (cherry picked from commit f19aff89)
      0bdcab10
    • Thomas Haller's avatar
      all: cleanup includes in header files · f19aff89
      Thomas Haller authored
      - don't include "nm-default.h" in header files. Every source file must
        include as first header "nm-default.h", thus our headers get the
        default include already implicitly.
      
      - we don't support compiling NetworkManager itself with a C++ compiler. Remove
        G_BEGIN_DECLS/G_END_DECLS from internal headers. We do however support
        users of libnm to use C++, thus they stay in public headers.
      f19aff89
  5. 28 Jul, 2016 2 commits
  6. 18 Sep, 2015 1 commit
    • Lubomir Rintel's avatar
      core: separate active and applied connection · 06da3532
      Lubomir Rintel authored
      Clone the connection upon activation. This makes it safe for the user
      to modify the original connection while it is activated.
      
      This involves several changes:
      
      - NMActiveConnection gets @settings_connection and @applied_connection.
        To support add-and-activate, we constructing a NMActiveConnection with
        no connection set. Previously, we would set the "connection" field to
        a temporary NMConnection. Now NMManager piggybacks this temporary
        connection as object-data (TAG_ACTIVE_CONNETION_ADD_AND_ACTIVATE).
      
      - get rid of the functions nm_active_connection_get_connection_type()
        and nm_active_connection_get_connection_uuid(). From their names
        it is unclear whether this returns the settings or applied connection.
        The (few) callers should figure that out themselves.
      
      - rename nm_active_connection_get_id() to
        nm_active_connection_get_settings_connection_id(). This function
        is only used internally for logging.
      
      - dispatcher calls now get two connections as well. The
        applied-connection is used for the connection data, while
        the settings-connection is used for the connection path.
      
      - needs special handling for properties that apply immediately
        when changed (nm_device_reapply_settings_immediately()).
      Co-Authored-By: Thomas Haller's avatarThomas Haller <thaller@redhat.com>
      
      https://bugzilla.gnome.org/show_bug.cgi?id=724041
      06da3532
  7. 05 Aug, 2015 1 commit
  8. 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).
      3452ee2a
  9. 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
      isolation.
      c81fb49a
  10. 23 Jul, 2014 1 commit
    • Dan Winship's avatar
      core: fill in nm-types.h, clean out other headers · b28f6526
      Dan Winship authored
      Clean up some of the cross-includes between headers (which made it so
      that, eg, if you included NetworkManagerUtils.h in a test program, you
      would need to build the test with -I$(top_srcdir)/src/platform, and if
      you included nm-device.h you'd need $(POLKIT_CFLAGS)) by moving all
      GObject struct definitions for src/ and src/settings/ into nm-types.h
      (which already existed to solve the NMDevice/NMActRequest circular
      references).
      
      Update various .c files to explicitly include the headers they used to
      get implicitly, and remove some now-unnecessary -I options from
      Makefiles.
      b28f6526
  11. 06 Jun, 2014 4 commits
    • Dan Williams's avatar
      dispatcher: add PRE_UP states · 19d7386b
      Dan Williams authored
      This event runs before a connection/device is announced as
      "activated" or "connected", to enable scripts to do things
      before applications begin using connectivity.  For example,
      this could be used to manage /etc/resolv.conf outside of
      NetworkManager and ensure that resolv.conf had correct
      information before DNS is used.
      
      Note that this is different than the Debian or Gentoo "pre-up"
      event used in /etc/network/interfaces, as that event runs before
      any L2 configuration has started.  If we really need an event
      like that, we'll add it later as "lower-up".
      19d7386b
    • Dan Williams's avatar
      dispatcher: robustify canceling dispatcher calls · 286e926e
      Dan Williams authored
      Thomas pointed out that using the address of the DispatcherInfo
      structure as the dispatcher call ID could cause a mis-cancelation
      if malloc re-used the same block in the future.  While the code
      should be correctly clearing call IDs after the callback runs
      or is canceled, just use numeric IDs to avoid potential crashses.
      286e926e
    • Dan Williams's avatar
      dispatcher: add synchronous dispatcher calls · 90b747fa
      Dan Williams authored
      On shutdown we can't defer the response to a callback, so we need to
      use synchronous D-Bus calls.  Second, sometimes we want to block on
      the dispatcher response, like for pre-down.
      90b747fa
    • Dan Williams's avatar
      dispatcher: only dispatch if scripts exist · 5150cb88
      Dan Williams authored
      If there are no dispatcher scripts, don't bother dispatching any
      events.  This saves some time configuring networking if the event
      would have no effect anyway.
      5150cb88
  12. 11 Sep, 2012 3 commits
  13. 21 May, 2012 1 commit
  14. 17 Dec, 2010 1 commit
    • Dan Williams's avatar
      policy: stop touching /etc/hosts · 39eed50e
      Dan Williams authored
      Handling of /etc/hosts is highly site- and admin- specific in
      many more complex cases, and it's exceedingly hard and error-
      prone for NetworkManager to handle all those cases.  So remove
      this functionality entirely.  That's not a big loss, as it
      turns out there's a much more elegant solution.
      
      The only requirement is that the machine's hostname map back
      to an IP address owned by the machine.  That requirement can
      be satisifed by nss-myhostname or even possibly the distro's
      installer.  If the user does not want nss-myhostname then it
      can be uninstalled.  Distros should use a "recommends" feature
      in their packaging system so that the NetworkManager package
      does *not* have a hard requirement on nss-myhostname.  Thus
      everyone is happy; things Just Work when nss-myhostname is
      installed, but more advanced users can uninstall it and
      customize /etc/hosts as they wish.
      
      Another alternative is a dispatcher script that listents for
      the 'hostname' event, and updates /etc/hosts according to the
      administrator's preference.
      39eed50e
  15. 07 Oct, 2010 1 commit
  16. 22 Jun, 2010 1 commit
    • Dan Williams's avatar
      policy: map hostname to current IP address (bgo #619931) · debb16cf
      Dan Williams authored
      Instead of always mapping the current hostname to 127.0.0.1 or
      whatever the user mapped it to manually, make sure the hostname
      maps to the default device's IPv4 and IPv6 address if there's
      a default device.
      
      This helps out services that do a lookup on the machine hostname
      to determine the IP address, which while a broken behavior (since
      there are too many edge-cases) is pretty wide-spread and thus
      we should support it.
      debb16cf
  17. 18 Jun, 2010 1 commit
  18. 19 Apr, 2010 1 commit
  19. 02 Mar, 2010 1 commit
    • Dan Williams's avatar
      hosts: always check and update /etc/hosts if needed (rh #569914) · e8b5bcca
      Dan Williams authored
      If the hostname was changed while NM wasn't running, and thus /etc/hosts
      was out of sync with the new hostname, NM wouldn't make sure that
      the new hostname was mapped in /etc/hosts.  Make sure that happens
      and add a bunch of testcases for /etc/hosts rewriting.
      e8b5bcca
  20. 03 Nov, 2008 1 commit
  21. 26 Jun, 2008 1 commit
  22. 19 Feb, 2007 1 commit
    • Tambet Ingo's avatar
      2007-02-19 Tambet Ingo <tambet@ximian.com> · 3dcd9d2d
      Tambet Ingo authored
      	* src/vpn-manager/nm-vpn-manager.c: Handle the DBUS state changes itself.
      	Handle device state changes and disconnect VPN if it's device deactivates.
      
      	* src/nm-dbus-nm.c: 
      	* src/nm-dbus-nm.h: 
      	* src/nm-dbus-device.c: 
      	* src/nm-dbus-device.c: 
      	* src/nm-dbus-net.c: 
      	* src/nm-dbus-net.h: Remove. All of it is implemented byt the new dbus API.
      
      	* src/NetworkManagerMain.h: Get rid of all but 3 properties of NMData.
      
      	* src/nm-device.c (nm_device_get_by_udi):
      	(nm_device_get_by_iface): Remove. This doesn't belong here and is already
      	implemented in the correct location (NMManager).
      	Rip out all the test_device stuff.
      
      	* src/NetworkManagerPolicy.c: Remove the leftover activation success and
      	failure handlers, it's all done by NMDevice already.
      
      	* src/NetworkManager.c: Move the signal handling here from nm-logging.c
      	Remove the iochannel hack to route the unix signals to the main thread since
      	we're not threaded anymore.
      
      	* src/NetworkManagerAP.c: Implement HWAddress property.
      
      	* src/NetworkManagerDbus.c: Remove the dbus signal sending code, it happens
      	automatically with dbus-glib.
      
      	* src/nm-netlink-monitor.c: 
      	* src/nm-netlink-monitor.h:
      		- Move it low in the class hierarchy, don't reference any NM types.
      		- Remove private data from the header.
      		- Use type safe checks in public API methods.
      		- Make it a singleton so we don't have to pass the single reference around.
      
      
      
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2339 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
      3dcd9d2d
  23. 27 Feb, 2006 1 commit
  24. 11 Feb, 2005 1 commit
    • Dan Williams's avatar
      2005-02-11 Dan Williams <dcbw@redhat.com> · 1cc2f8c3
      Dan Williams authored
      	* dhcpcd/client.c
      		- (dhcp_init): only print out client ID and class ID if they are specified
      
      	* src/NetworkManagerDbus.[ch]
      	  src/nm-dbus-nm.[ch]
      	  src/nm-dbus-device.[ch]
      	  src/nm-dbus-net.[ch]
      		- Move NM, Device, and Net functions to separate files and use the
      			dbus method list stuff in NetworkManagerDbusUtils.c to do
      			method dispatching
      
      	* src/NetworkManagerDbusUtils.c
      		- Add new validate_method called before each dispatch (if present)
      			that can validate the method call
      
      	* src/NetworkManagerWireless.c
      		- (nm_wireless_qual_to_percent): Fix misplaced "!" that caused signal
      			levels never to be evaluated
      
      	Patch from j@bootlab.org
      	* src/NetworkManagerDevice.c
      		- Add typedef for "u64"
      
      	* src/backends/NetworkManagerDebian.c
      		- Copy in Dave Woodhouse's fixes for IPv6
      
      
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@438 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
      1cc2f8c3
  25. 25 Aug, 2004 1 commit
  26. 05 Aug, 2004 2 commits
  27. 28 Jul, 2004 1 commit
    • Dan Williams's avatar
      2004-07-27 Dan Williams <dcbw@redhat.com> · b0d607f9
      Dan Williams authored
      	* Remove various Makefile.in files
      
      	* TODO
      		- Add some more items
      
      	* configure.in
      		- Add checks for OpenSSL/md5 headers and libs
      
      	* src/Makefile.am
      		- Use OpenSSL CFLAGS
      
      	* src/NetworkManagerAP.[ch]
      		- Remove 'stamp' functions, replace with 'invalid' functions
      			to support user cancelling WEP key entry
      
      	* src/NetworkManagerDbus.c
      		- Remove 'stamp' return functions
      		- Treat returned user key as a passphrase and convert to a WEP key,
      			but don't actually use the WEP key yet.  We use the returned user
      			key as a hexadecimal WEP key until we can figure out a UI for
      			passphrase-vs-hex key
      
      	* src/NetworkManagerWireless.[ch]
      		- Add passphrase-to-128bit-key function
      
      
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@28 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
      b0d607f9
  28. 25 Jul, 2004 1 commit
    • Dan Williams's avatar
      2004-07-24 Dan Williams <dcbw@redhat.com> · 8ae95bf5
      Dan Williams authored
      	* src/NetworkManager.[ch]
      	  src/NetworkManagerDbus.[ch]
      	  src/NetworkManagerDevice.[ch]
      	  src/NetworkManagerPolicy.c
      	  src/NetworkManagerWireless.[ch]
      		- Add many more g_return_if_fail()/g_return_val_if_fail() checks
      		- Pass the NMData application data structure through all calls
      			that need it so we can get rid of nm_get_global_data()
      		- Change deallocation of the allowed_ap_list GSList in preparation
      			for not completely clearing it every time we get an update,
      			but instead getting incremental updates via GConf/dbus
      
      
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@20 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
      8ae95bf5
  29. 06 Jul, 2004 1 commit
    • Dan Williams's avatar
      2004-07-05 Dan Williams <dcbw@redhat.com> · 019e2337
      Dan Williams authored
      	* dispatcher-daemon/NetworkManagerDispatcher.c
      		- A bit more descriptive state message
      		- Don't segfault when reading directory
      
      	* src/NetworkManager.h
      		- Remove NMData desired_ap member, its now
      			per-device rather than global
      
      	* src/NetworkManager.c
      		- Remove references to desired_ap
      		- Move the allowed AP list refresh stuff into a thread
      
      	* src/NetworkManagerDevice.c
      	  src/NetworkManagerDevice.h
      		- Each wireless device now has a "best ap"
      		- Make device activate/deactivate functions per-device
      		- Make wireless scanning per-device
      		- Add IPv4 address discover functions, stub IPv6 ones
      		- Move ethernet address validation functions to NetworkManagerUtils.c
      		- Add wireless access point accessor function
      		- Get/Set functions for "best ap"
      
      	* src/NetworkManagerPolicy.c
      		- Move activate/deactivate stuff into NetworkManagerDevice.c, per-device
      		- Deal with per-device "best ap" rather than data->desired_apa
      		- Implement allowed access point worker thread
      		- Add nm_policy_essid_is_allowed() function
      
      	* src/NetworkManagerUtils.c
      	  src/NetworkManagerUtils.h
      	  	- Add nm_ethernet_address_is_valid() function
      		- Add IPv4/IPv6 address get functions
      
      	* src/NetworkManagerWireless.c
      	  src/NetworkManagerWireless.h
      		- Move scanning stuff into NetworkManagerDevice.c, per-device
      
      
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@12 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
      019e2337