Commit graph

397 commits

Author SHA1 Message Date
Robert Love
058e30e25d 2005-12-09 Robert Love <rml@novell.com>
* src/NetworkManagerDevice.c: handle error better in
	  nm_device_set_mode().


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1151 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-12-09 19:38:05 +00:00
Robert Love
9674539f15 2005-12-08 Robert Love <rml@novell.com>
* include/NetworkManager.h: add WPA capabilities constants
	* src/NetworkManagerDevice.c: detect if wireless devices support WPA
	  or WPA2 and add the capabilities bits as appropriate.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1150 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-12-08 21:48:41 +00:00
Robert Love
dec36b0540 2005-12-08 Robert Love <rml@novell.com>
* src/NetworkManagerDevice.c: We want to fall back on and default to
	  IW_MODE_AUTO, not -1, which is more in line with our previous
	  behavior.  Otherwise, we try to set the wireless mode to -1 in
	  nm_device_set_mode().


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1147 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-12-08 15:40:24 +00:00
Robert Love
231c04097c 2005-12-07 Robert Love <rml@novell.com>
* gnome/applet/applet-dbus-info.c, include/NetworkManager.h,
	  src/NetworkManagerAP.c, src/NetworkManagerAP.h,
	  src/NetworkManagerAPList.c, src/NetworkManagerDbus.c,
	  src/NetworkManagerDevice.c, src/NetworkManagerDevice.h,
	  src/nm-dbus-nm.c: Convert NM_DEVICE_AUTH_METHOD_* to use the
	  wireless-tools constants directly.  UNKNOWN is now -1 and NONE is
	  zero.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1144 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-12-07 20:21:29 +00:00
Robert Love
91b74775a5 2005-12-07 Robert Love <rml@novell.com>
* src/backends/NetworkManagerSuSE.c: In static configurations, if the
	  supplied IP is invalid, fall back to DHCP.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1143 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-12-07 17:55:39 +00:00
Dan Williams
eff693f386 2005-12-07 Dan Williams <dcbw@redhat.com>
* Convert NETWORK_MODE_* constants to IW_MODE_*
	* Make all the get_mode/set_mode functions take and return 'int'
	* Convert D-BUS calls that pass mode to DBUS_TYPE_INT32 rather than UINT32


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1142 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-12-07 17:40:37 +00:00
Robert Love
a4cab32122 2005-12-07 Robert Love <rml@novell.com>
* src/NetworkManagerDevice.c: strncpy() buffer check.
	* src/NetworkManagerUtils.c: be anal about syslog() formatting.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1141 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-12-07 15:56:47 +00:00
Dan Williams
df786181e4 2005-12-06 Dan Williams <dcbw@redhat.com>
* Change nm_device_is_* functions to better names:
		nm_device_is_wireless() -> nm_device_is_802_11_wireless()
		nm_device_is_wired() -> nm_device_is_802_3_ethernet()


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1132 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-12-07 00:38:33 +00:00
Dan Williams
bfae8891a7 2005-12-06 Dan Williams <dcbw@redhat.com>
* Change naming of NMDeviceType to something more sensible:
		NM_DEVICE_TYPE_DONT_KNOW -> NM_DEVICE_TYPE_UNKNOWN
		NM_DEVICE_TYPE_WIRED_ETHERNET -> NM_DEVICE_TYPE_802_3_ETHERNET
		NM_DEVICE_TYPE_WIRELESS_ETHERNET -> NM_DEVICE_TYPE_802_11_WIRELESS


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1131 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-12-07 00:22:52 +00:00
Dan Williams
6bcf90acf2 2005-12-06 Dan Williams <dcbw@redhat.com>
* Move NetworkManager.h -> include/NetworkManager.h
	* Split out VPN stuff to include/NetworkManagerVPN.h
	* Fix up makefiles to include new location
	* Fix up sources to include NetworkManagerVPN.h


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1130 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-12-06 23:37:09 +00:00
Dan Williams
58d310199c 2005-12-06 Dan Williams <dcbw@redhat.com>
Slackware patches from Paul Blazejowski <paulb@blazebox.homeip.net>
	* initscript/Slackware/rc.networkmanager
		- Cosmetic fix

	* src/backends/NetworkManagerSlackware.c
		- Kill dhcpcd when starting so that dhclient can bind to DHCP on
			interfaces


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1127 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-12-06 21:24:23 +00:00
Robert Love
8e2dbddf82 proper puncuation
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1120 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-12-05 20:41:15 +00:00
Robert Love
02ea0ef426 2005-12-05 Robert Love <rml@novell.com>
* src/NetworkManager.c: don't call nm_data_free() when there is nothing
	  to free, particularly here as it just barfs.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1119 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-12-05 20:40:46 +00:00
Dan Williams
1d8201cb9e 2005-12-03 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerUtils.[ch]
	  src/nm-ip4-config.c
		- move ip4_netmask_to_prefix() to NetworkManagerUtils.c
		- consolidate code into nm_utils_ip4_addr_to_nl_addr()


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1116 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-12-04 02:23:29 +00:00
Robert Love
46898b0f62 2005-12-01 Robert Love <rml@novell.com>
* src/NetworkManagerSystem.c: If iface_to_rtnl_link() returns NULL, the
	  interface is already gone, so don't call rtnl_link_change() to down
	  it (which will segfault, anyhow).


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1114 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-12-01 21:42:41 +00:00
Robert Love
3738ba5503 2005-11-22 Robert Love <rml@novell.com>
* src/backends/NetworkManagerSuSE.c: Don't fall back to DHCP if the
	  gateway is not set, just print a little note.  Configurations without
	  gateways are valid.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1110 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-11-22 15:51:40 +00:00
Dan Williams
67913703fc 2005-11-08 Dan Williams <dcbw@redhat.com>
Patch from Bill Moss <bmoss@clemson.edu>
	* src/NetworkManagerDevice.c
		- (nm_device_activate_stage5_ip_config_commit): fix ordering
			of nm_policy_schedule_activation_finish() to prevent a
			race condition that causes the link to be dropped


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1102 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-11-09 01:59:23 +00:00
Dan Williams
6f68d85cd4 2005-11-08 Dan Williams <dcbw@redhat.com>
Patch from Bill Moss <bmoss@clemson.edu>
	* src/NetworkManagerAPList.c
	  src/NetworkManagerDevice.c
	  src/NetworkManagerDbus.c
		- Replace occurances of ether_ntoa_r() with iw_ether_ntop() so
			we get more readable ether/mac addresses


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1101 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-11-09 01:56:03 +00:00
Robert Love
eca4d33050 misc. comment updates.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1099 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-11-04 20:57:59 +00:00
Christopher Aillon
d52b45a03a 2005-11-02 Christopher Aillon <caillon@redhat.com>
* src/NetworkManagerPolicy.c:
	(nm_policy_device_change_check) Clarify wireless switch nm_info text


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1088 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-11-02 06:29:06 +00:00
Dan Williams
044acdad23 2005-10-27 Dan Williams <dcbw@redhat.com>
Start using libnl.  You need 1.0-pre3 or higher.  Eventually
	we should replace most of the distro-specific backend code
	with libnl stuff.

	Get it here:  http://people.suug.ch/~tgr/libnl/

	* configure.in
	  src/Makefile.am
		- Add checks for libnl pkgconfig file
		- Use LIBNL_LIBS & LIBNL_CFLAGS

	* src/NetworkManagerSystem.c
	  src/nm-ip4-config.[ch]
		- Use libnl rather than ioctl() for most things
		- Remove unused functions


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1082 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-28 03:16:02 +00:00
Dan Williams
5035d2ae01 Don't try to free a nonexistent error
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1081 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-28 03:11:43 +00:00
Robert Love
96834afcc2 2005-10-27 Robert Love <rml@novell.com>
* src/backends/NetworkManagerSuSE.c: fix warning message text


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1079 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-27 20:08:23 +00:00
Dan Williams
d29cc5bae0 2005-10-25 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevice.c
		- (get_scan_results): cleanups, deal cleanly with ENODATA signifying
			no scan results
		- (free_process_scan_cb_data): unref the device when freeing results
		- (nm_device_wireless_process_scan_results): free scan results a bit later
			so we don't unref the device underneath ourselves


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1073 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-26 15:49:38 +00:00
Dan Williams
d209f3a6d0 2005-10-25 Dan Williams <dcbw@redhat.com>
* Back out 2005-10-24 commit from Tor Krill.  Patch
		causes nameservers never to be removed from named.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1072 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-26 02:40:46 +00:00
Dan Williams
a81faff483 2005-10-24 Dan Williams <dcbw@redhat.com>
Clean up wireless scanning and wireless link probing.  Goal: to not be as
	touchy with intermittent connections.

	* src/NetworkManagerDevice.c
		- (nm_device_probe_wireless_link_state): instead of calling nm_get_best_ap(),
			just see if there's an activation request on the device, and check the
			current link against the activation request access point's ESSID.
		- (link_to_specific_ap): increase the # of failed links we tolerate from 3 to 6
		- (nm_device_wireless_process_scan_results): actually free our scan data, and
			don't call process_scan_results() on zero-length data
		- (nm_device_set_wireless_scan_interval): increase the init scan interval to
			15 seconds (from 10)


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1070 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-25 00:56:55 +00:00
Dan Williams
af55ad0ff5 2005-10-24 Dan Williams <dcbw@redhat.com>
* src/backends/interface_parser.c
		- Add void to function declarations that need it
			to match patch from Engin AYDOGAN

	* src/backends/interface_parser.h
		- Remove unused prototype for ifparser_interfaces()

	Patch from Engin AYDOGAN <engin@bzzzt.biz>
	* src/backends/interface_parser.h:
		- Compile fixes for gcc 4.0.2 (add void)


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1068 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-24 15:04:28 +00:00
Dan Williams
f54406831c 2005-10-24 Dan Williams <dcbw@redhat.com>
Patch from Tor Krill <tor@krill.nu>
	* src/named-manager/nm-named-manager.c
		- Write more than just the first nameserver to /etc/resolv.conf
		- Write out valid /etc/resolv.conf on exit


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1067 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-24 14:49:26 +00:00
Christopher Aillon
7cd89af612 2005-10-19 Christopher Aillon <caillon@redhat.com>
* src/backends/NetworkManagerGentoo.c:
	Fix path to killall.  Patch from Dave Shanker <dshanker@gmail.com>


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1064 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-21 21:50:49 +00:00
Robert Love
2930c9c4c1 2005-10-20 Robert Love <rml@novell.com>
* src/NetworkManagerDevice.c: Use fabs() and DBL_EPSILON to avoid a
	  direct comparison of floating point values, which is never correct.
	  Also some misc. cleanup.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1063 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-20 20:41:51 +00:00
Dan Williams
b989888977 Don't install named config files we don't use anymore
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1050 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-19 14:28:34 +00:00
Dan Williams
ff88a840ee 2005-10-19 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevice.c
		- (process_scan_results): don't drop the last (or only)
			access point we see


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1049 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-19 14:19:53 +00:00
Christopher Aillon
de3985c598 2005-10-19 Christopher Aillon <caillon@redhat.com>
* src/backends/NetworkManagerSlackware.c:
	Patch from Nico <lordllucifer@gmail.com>
		- Update the Slackware backend.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1048 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-19 13:44:34 +00:00
Robert Love
abac41aabe 2005-10-18 Robert Love <rml@novell.com>
* src/NetworkManagerDevice.c: invoke the long-in-the-tooth named
	  function nmwa_schedule_state_change_signal_broadcast() when we
	  deactivate a device, too.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1045 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-18 14:57:31 +00:00
Robert Love
9977ed57e5 2005-10-17 Robert Love <rml@novell.com>
* src/NetworkManagerDevice.c: Actually wait 20s, as we intend, not
	  two seconds -- tries is updated every 1/10 of a second, not every
	  second..


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1033 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-17 20:29:23 +00:00
Robert Love
3c1259fd9f 2005-10-17 Robert Love <rml@novell.com>
* src/nm-ip4-config.c: use GPOINTER_TO_UINT and not a straight cast
          in order to remain 64-bit clean.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1031 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-17 19:04:01 +00:00
Robert Love
60785e336d 2005-10-17 Robert Love <rml@novell.com>
*  src/backends/NetworkManagerDebian.c,
           src/backends/NetworkManagerRedHat,
           src/backends/NetworkManagerSuSE.c: allow '#' as a valid resolv.conf
           comment delimiter.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1028 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-17 18:28:16 +00:00
Robert Love
2d747adc14 2005-10-17 Robert Love <rml@novell.com>
* src/backends/NetworkManagerSuSE.c: use SYSCONFDIR not open-coded
          "/etc"


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1027 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-17 18:06:10 +00:00
Christopher Aillon
9e577ba84c 2005-10-17 Christopher Aillon <caillon@redhat.com>
* src/NetworkManagerDevice.c: (process_scan_results)
	Fix logic that checks to see whether we have an ESSID.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1026 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-17 15:36:26 +00:00
Dan Williams
994948d758 2005-10-15 Dan Williams <dcbw@redhat.com>
Move scanning code into NetworkManager rather than use iwlib's
	iw_scan() function, so that we can figure out AP capabilities.

	* NetworkManager.h
		- Add AP capability bits

	* src/NetworkManagerAP.[ch]
		- Add capability field to NMAccessPoint structure
		- Add WPA & RSN Information Element fields and accessor
			functions to NMAccessPoint

	* src/NetworkManagerDevice.c
		- Remove usage of iw_scan
		- Add scanning code to NetworkManager rather than use
			iw_scan() from iwlib

	* src/NetworkManagerUtils.[ch]
		- (nm_dispose_scan_results): remove, unused


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1023 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-15 04:11:01 +00:00
Dan Williams
a01d6f27dc 2005-10-11 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevice.c
		- Use the driver's WE version for scanning rather than
			the WE version NM was compiled with.  Fixes random
			crashes in iw_scan () in iwlib.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1017 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-11 20:13:28 +00:00
Peter Jones
68c498246d info.linux.driver is on the physical device, not the network device's parent.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1016 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-11 16:18:12 +00:00
Dan Williams
115dc5264b 2005-10-10 Dan Williams <dcbw@redhat.com>
* Remove nm_system_load_device_modules() from backend files
		and from NetworkManager.c


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1014 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-10 18:00:59 +00:00
Dan Williams
d41e3a4244 2005-10-10 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerPolicy.c
		- Fix some bugs introduced by the capabilities patch


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1013 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-10 12:57:49 +00:00
Dan Williams
2916c77466 Fix warning, since warnings are treated as errors
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1011 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-10 01:25:48 +00:00
Dan Williams
91ba6be6e7 2005-10-09 Dan Williams <dcbw@redhat.com>
Patch from Bill Moss <bmoss@clemson.edu>
	* src/NetworkManagerDevice.c
		- (nm_device_set_user_key_for_network): don't try to set auth
			mode on the AP from the allowed list if it's NULL


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1010 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-10 01:21:58 +00:00
Dan Williams
d59b385719 Fix some warnings
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1008 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-09 04:46:36 +00:00
Dan Williams
69d77f6b56 2005-10-09 Dan Williams <dcbw@redhat.com>
* Replace the "driver support level" stuff with capabilities.  The
		capability field is a bitfield that is more flexible than the
		old driver support level thing.  It's mostly so we can easily
		figure out what supports WPA and what doesn't, but should be
		quite useful later.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1007 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-09 04:39:49 +00:00
Robert Love
fa4e8074e7 2005-10-07 Robert Love <rml@novell.com>
* gnome/applet/applet-dbus-info.c, gnome/applet/applet.c,
          gnome/applet/applet.h, gnome/vpn-properties/nm-vpn-properties.c,
          src/dhcp-manager/nm-dhcp-manager.c, test/libnm_glib_test.c,
          test/nmtest.c test/nmtestdevices.c: mark functions 'static' as
          appropriate


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1004 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-07 19:17:06 +00:00
Robert Love
9a52a3ed38 2005-10-07 Robert Love <rml@novell.com>
* src/NetworkManagerWireless.c: remove stale, unused function, who goes
          by the name nm_update_device_wireless_timeouts() and once tried,
          without success, to steal my pet turtle.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1000 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-10-07 17:24:56 +00:00