* dhcpcd/client.c
- Rework the DHCP client code to be much less chatty when
it receives non-DHCP UDP packets during the DHCP run
(reported by and preliminary patches from Bill Moss)
* Move wireless scanning to a separate thread. This thread forwards the
results to the main thread when done where they are integrated into
the device's access point lists. This keeps the main thread (which
does all the DBUS communication) from being blocked for long periods
of time by wireless scanning.
* Make state modification an idle routine in the main loop, and trigger
state changes rather than polling for them.
* src/backends/NetworkManagerGentoo.c
- Fix up invalid C90 code (reported by Christoph Ruessler)
* src/NetworkManagerDevice.c
- Revert IPv6 patch for wired devices from 2004-12-22 for
router advertisements, causing problems and infinite loop
during "best" device determination due to link going up/down
(reported by Bill Moss)
Apply patch from Peter Jones
* src/NetworkManagerDevice.c
- Shortcut for link-checking for ipw2x00 cards
- Split out association check into separate routine
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@360 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerDevice.c
- Take down then bring up wired devices after connection so
they send out ipv6 router advertisements
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@356 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerDevice.c
- Silently fail when setting bitrate doesn't work
Patch from j@bootlab.org:
* src/backends/NetworkManagerDebian
- Update backend to match functionality in RedHat backend
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@355 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManager.c (nm_data_new): Initialize named.
Also, set up a signal handler for SIGINT/SIGTERM, and exit
the mainloop when these signals are received.
(nm_data_free): Unref named.
(sigterm_handler, sigterm_pipe_handler): New functions for
exiting mainloop.
* src/NetworkManagerMain.h (NMData): Add signal handling and
nameserver bits.
* src/NetworkManager.c (nm_device_unref): Quit device mainloop on
unref.
* src/NetworkManagerDHCP.c (set_nameservers): New function;
set nameservers from DHCP response data.
(set_domain_search): Set domain search from DHCP response.
(nm_device_dhcp_configure): Invoke them.
* src/NetworkManagerSystem.c
(nm_system_device_update_resolv_conf): Delete. Deleting
code is totally sweet.
* src/Makefile.am (NetworkManager_LDADD): Add libnamed.
* named/nm-named-manager.h, named/nm-named-manager.c: New files;
implements an object which controls a nameserver. Currently
uses bind 9.
* configure.in: Check for named.
* Makefile.am (SUBDIRS): Add named dir.
* named/named.conf: New template config file.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@352 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* Ad Ad-Hoc networking mode support. In Ad-Hoc mode, we only try to get
link-local addresses instead of doing DHCP.
* In the panel applet, there's a new "Create new Wireless Network..." item
* The panel applet also sticks around now even if NetworkManager dies, but
it doesn't hide its icon when NM isn't around. Not hiding the icon is
a bug, I'll fix that later.
* We also don't use 'nscd' anymore in the RH backend, it was impeding name
lookups after a switch rather than actually doing them.
* Clean up some of those warnings in nm_ap_list_* functions
* Delay between scans changed to 15s instead of 10s
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@342 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Patch from Tom Parker
* Add autoip/Link Local Addressing support when we fail to get a DHCP
address
* Longer pause after setting ESSID on cards that support a larger number
of channels to give the card time to find the right channel
* Add system hook to restart mDNSResponder (or whatever the local implementation
of Multicast DNS is) when we activate interfaces
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@341 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* Major rework of the DHCP code, taking some cues from pump. We don't
write raw Ethernet packets anymore, which simplifies the code quite
a bit. The new code should be more robust, not hang in recvfrom()
as much, and generally work better. This also means that we need
to force HAL/dbus to use a created GMainContext rather than the
default context, since having the DHCP renew/rebind thread using
its own GMainContext seemed to give dbus a fit. There is also more
debugging information printed from the DHCP loop to help with future
problems.
* Also, if the DHCP server doesn't give us the "routersOnSubnet" option,
assume that the default gateway should be the DHCP server.
Patch from Matthew Schick <matt oss-institute org>
* src/backends/NetworkManagerGentoo.c
- Fix compilation error due to missing "ip4_broadcast"
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@336 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* configure.in: Suck in gcc warnings code from Rhythmbox,
but use fewer default flags, and in particular add -Wno-unused,
since the codebase has a lot of unused variables.
* test/nmtestdevices.c (create_device):
* test/nminfotest.c (get_network_string_property)
(get_networks_of_type):
* test/nmclienttest.c (main):
* src/NetworkManagerDbus.c (nm_dbus_create_error_message):
* initscript/NMLaunchHelper.c (get_nm_status):
* info-daemon/NetworkManagerInfoPassphraseDialog.c (update_button_cb):
* info-daemon/NetworkManagerInfoDbus.c (nmi_dbus_create_error_message):
Fix declarations after statements.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@331 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerWireless.c (nm_wireless_qual_to_percent):
Remove useless CLAMP (); the value is unsigned, and the case tests
qual->qual < 100, so the value must always be between 0 and 100.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@325 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/backends/NetworkManagerRedHat.c (nm_system_update_dns): Run
"nscd -i hosts" to invalidate the host cache instead of restarting nscd,
which is essentially a noop since nscd caches hosts on disk too.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@322 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerDevicePrivate.h
- Split out the NMDevice struct to a different file so that stuff like
NetworkManagerDHCP.c and NetworkManagerSystem.c can use it
* dhcpcd/client.c
- fprintf->syslog
- (dhcpSendAndRecv): do non-blocking sends and receives, and check to see if we
need to cancel the dhcp request during the send and recv
* dhcpcd/client.h
- Move the DHCP option enum to dhcpcd.h
* src/NetworkManagerDHCP.c
- Split out the actual IP/netmask/etc setting code
- New Renew/Rebind functions
- New timer setup function for renew/rebind operations
* src/NetworkManagerDevice.c
- For device activation, if we are using DHCP then keep the activation thread
alive until device deactivation. We need to renew/rebind the DHCP address
after the T1 (renew) and T2 (rebind) times have expired.
- Increase some timeouts after bringing wireless cards up/down
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@320 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* Cache access point MAC addresses in NetworkManagerInfo after you've explicitly
connected to them. Then, after a scan, match up non-ESSID-broadcasting access
points with any cached MAC addresses from NetworkManagerInfo. Allows us to
show known access points that don't broadcast their ESSID in the menus without
any user intervention whatsoever.
* info-daemon/NetworkManagerInfoDbus.c
- (nmi_dbus_get_network_addresses, nmi_dbus_add_network_address): new functions
for dbus method calls "getNetworkAddresses" and "addNetworkAddress"
* src/NetworkManagerAP.[ch]
- Add a "user_addresses" data member to the NMAccessPoint structure
- (nm_ap_get_user_addresses, nm_ap_set_user_addresses): new functions for accessing
the user_addresses data member
* src/NetworkManagerAPList.c
- (nm_ap_list_get_ap_by_address): check user_addresses list too, instead of just
the AP's reported address
- (nm_ap_list_update_network): grab the user_addresses list from NetworkManagerInfo
* src/NetworkManagerDHCP.c
- Increase DHCP timeout from 25s -> 30s
* src/NetworkManagerDbus.[ch]
- (nm_dbus_get_network_addresses, nm_dbus_add_network_address): have NMI get/set
user addresses
* src/NetworkManagerDevice.c
- (nm_device_set_wireless_config): bring down the interface, wait 4s, bring it up,
wait 2s, then configure it. Sometimes Prism54 cards will freeze up with
"mgnt tx queue full", seemingly in response to NM controlling the card too much.
So, we take the card down to clear it out.
- (nm_device_do_normal_scan): Copy over AP ESSIDs from the allowed access point list
too, since that's where the user_addresses are
* src/NetworkManagerPolicy.c
- (nm_state_modification_monitor): Tell NMI to add an AP's hardware address to
that wireless networks' user_addresses list upon successful activation
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@319 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerDevice.[ch]
- (nm_device_clear_activation_fail): new function
* src/NetworkManagerPolicy.c
- (nm_state_modification_monitor): clear the activation_failed flag on devices
when we've dealt with the failure so the user doesn't get failure-dialog-spammed
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@317 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerDevice.c
- (nm_device_activate_wireless): Unref best_ap upon success so we don't
leak the structure, better updating of now_scanning status
- (nm_device_wireless_network_exists): Rewrite for better/faster checking
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@316 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Major rework of link detection code. We now use DHCP
as part of the link detection which proves to be much more robust,
and also supports Open System authentication for wireless networks.
We no longer use external DHCP client programs. Instead, we use
our own DHCP client, based on substantially reworked bits of 'dhcpcd'
which was written by:
Yoichi Hariguchi <yoichi@fore.com>
Sergei Viznyuk <sv@phystech.com>
http://www.phystech.com/download/
It resides in the "dhcpcd" directory and was refactored into a general
purpose DHCP client library by me.
Also misc fixes (CPPFLAGS->AM_CPPFLAGS, move some stuff around),
move src/backends/NetworkManagerSystem.h -> src/NetworkManagerSystem.h
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@314 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Patch from Tom Parker <palfrey@tevp.net>:
* src/Makefile.am (CPPFLAGS): Switch to AM_CPPFLAGS.
* src/backends/NetworkManagerRedHat.c: Switch to
including shvar.h instead of shvar.c.
* src/backends/NetworkManagerDebian.c: Don't include
interface_parser.c in source file.
(libnmbackend_la_SOURCES): Don't include shvar.[ch]
and interface_parser.[ch].
* src/Makefile.am (libnmbackend_la_SOURCES) <TARGET_REDHAT>:
Include shvar.c and shvar.h here.
(libnmbackend_la_SOURCES) <TARGET_DEBIAN>: Include
interface_parser.c and interface_parser.h here.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@310 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* configure.in: Strip out TARGET_DISTRO and
SYSTEM_BACKEND_FILE variables. Switch to Automake
conditionals.
* src/Makefile.am (noinst_LTLIBRARIES): Add libnmbackend.la.
(libnmbackend_la_SOURCES): Use Automake conditionals
to add distro-specific files.
* initscript/Makefile.am (SUBDIRS): Update to
use conditionals.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@309 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Patches from j bootlab org
* src/NetworkManagerDevice.c
- (nm_device_activate_wireless): wait 5 seconds before attempting to detect
whether the card has a link or not, some cards are slow
- (nm_device_activation_configure_ip): make ipv6 work a bit better
* info-daemon/NetworkManagerInfoPassphraseDialog.c
- Disable the "Login" button on the passphrase dialog until the user
enters a valid passphrase or key
Patches from Tom Parker <palfrey tevp net>
* src/backends/NetworkManagerDebian.c
- Add static IP support to the debian backend
* src/backends/interface_parser.[ch]
- Parse debian interface config files
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@303 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerDevice.c
- Some random fprintf->syslog conversions
- (nm_device_wireless_network_exists): double-check for network
- (nm_device_find_and_use_essid): Copy over encryption key no matter what
* src/NetworkManagerWireless.[ch]
- (nm_wireless_[128|64]bit_ascii_to_hex): make "ascii" argument unsigned again
so that the binary->ascii conversion works (if unsigned, the bitshift
will fill with zeros, which is what's required). Also mask bitshift
result with 0xF for futher assurance.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@300 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerUtils.c
- (nm_get_wireless_driver_support_level): default to
FULLY_SUPPORTED rather than UNSUPPORTED, forgot to
flip this when changing from whitelist->blacklist of
wireless drivers
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@299 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* info-daemon/NetworkManagerInfoDbus.c
src/NetworkManagerDbus.[ch]
src/NetworkManagerDevice.c
- Keep track of the # of attempts to get the WEP key
from the user and pass that along to the info daemon
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@297 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerUtils.c
- Blacklist wireless cards rather than whitelisting them.
- Grab driver name from HAL rather than trying to find it
ourselves.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@296 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* panel-applet/NMWirelessAppletOtherNetworkDialog.c,
- Disable OK button until valid data is entered
for encryption stuff too
* panel-applet/NMWirelessApplet.c
- Report card strength for current AP if the card
doesn't report strength data for scanned access
points
* src/NetworkManagerDevice.c
- Smooth out cards reported quality, Atmel card was
intermittently reporting no quality data but soon
recovers
* src/NetworkManagerWireless.c
- Better quality data percentage calculation. Atmel
cards (mine at least) seem to report the quality
in percentage format already, so honor that
Patch from <j@bootlab.org>
* NetworkManager.h
info-daemon/NetworkManagerInfoPassphraseDialog.c
info-daemon/passphrase.glade
panel-applet/NMWirelessAppletOtherNetworkDialog.c
panel-applet/essid.glade
src/NetworkManagerAP.c
src/NetworkManagerDevice.c
src/NetworkManagerWireless.[ch]
- Support ASCII WEP keys, in both 40/64 bit and 104/128 bit
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@291 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerDevice.[ch]
- (nm_device_set_enc_key): Add parameter to set Authentication
Mode (Open System, Shared Key, or None). We're still using
Shared Key for now though.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@289 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerDevice.c
- (nm_device_wireless_network_exists): Actually use the encryption
key we got from the applet when attempting to find a wireless network
- Don't bring devices down so much since on some cards it triggers
firmware hotplugs each time
* src/NetworkManagerDbus.c
- (nm_dbus_nm_set_active_device): free the passphrase we may have gotten
from the caller
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@279 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManager.c
- (nm_hal_device_property_modified): unlock a locked active
wireless device when a wired connection gets a link.
(Means you'll switch to wired whenever you plug in no
matter what).
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@278 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* panel-applet/NMWirelessAppletOtherNetworksDialog.[ch]
- New files, implement the "Other wireless network" dialog
* panel-applet/NMWirelessApplet.c
- Move "other wireless network" dialog to separate file
* panel-applet/NMWirelessAppletDbus.[ch]
- Take key and key_type paramaters for the set_device function
* panel-applet/essid.glade
- Add UI bits for encryption settings
* src/NetworkManagerDbus.c
- Retrieve key and key_type params for "setActiveDevice" method call
and pass them on
- unref AP returned from nm_device_get_best_ap() when needed
* src/NetworkManagerDevice.c
- (nm_device_get_best_ap): ref the ap before returning it
- unref AP returned from nm_device_get_best_ap() when needed
- (nm_device_activate_wireless): add "ap" parameter so we don't
need to call nm_device_get_best_ap() here, it was pretty much
redundant anyway
- (AP_NEED_KEY): break second link check condition out into separate
function, and fix segfault when ap->enc_key_source was NULL
- (nm_device_find_and_use_essid): take key and key_type parameters and
pass them along to nm_device_wireless_network_exists(). If the
network does exist, set the passed-in key+key_type on the AP
* src/NetworkManagerPolicy.c
- unref AP returned from nm_device_get_best_ap() when needed
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@277 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerUtils.c
- (nm_spawn_process): Fix a potential dereference of NULL
Patches from Peter Jones:
* src/NetworkManagerDevice.c
- (nm_device_test_wireless_extensions): Better check for
wireless devices
* src/NetworkManagerUtils.c
- (nm_spawn_process): Pass in valid stdout and stderr so
executed programs don't randomly SIGPIPE and fail
- (nm_get_wired_driver_support_level): quash hal warning
when checking for USB ethernet device
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@276 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* info-daemon/NetworkManagerInfo.c
info-daemon/NetworkManagerInfoDbus.c
info-daemon/NetworkManagerInfoPassphraseDialog.c
panel-applet/NMWirelessApplet.c
- Properly escape gconf keys
* src/NetworkManager.c
- remove unused variables
* src/NetworkManagerAP.c
- (nm_ap_new_from_ap): Don't redundantly set new APs
refcount since it got set in nm_ap_new()
* src/NetworkManagerAPList.c
- (nm_ap_list_combine): Give up ownership of newly created
access points to the ap list, fixes memleak
* src/NetworkManagerDevice.c
- Remove cached_ap_list4 member since its not really needed
- (nm_device_wireless_network_exists): Try to get correct
encryption status of a found AP if its already in our
device list
- (nm_device_do_normal_scan): Clean up scanning a bit, make
memory allocs/deallocs a bit clearer and shorter-lived
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@275 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* info-daemon/NetworkManagerInfoDbus.c
- Trap the "DeviceActivationFailed" signal
* docs/NetworkManager DBUS API.txt
- Add "DeviceActivationFailed" signal
* panel-applet/NMWirelessAppletDbus.c
- Quash the "NetworkManager service not available" message
* src/NetworkManagerDbus.[ch]
- Add the "DeviceActivationFailed" signal
* src/NetworkManagerDevice.c
- Add support for activation_failed flag
- Fix deadlock where activation thread didn't clean itself up, making
main thread still believe it was alive forever (didn't reset activation
flags like activating, just_activated, etc when IP configuration
failed)
* src/NetworkManagerPolicy.c
- Implement logic for DeviceActivationFailed signal, and when activation fails
for wireless networks, try to fall back to some other access point
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@268 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* panel-applet/NMWirelessApplet.[ch]
- Place the GtkMenuBar inside a GtkEventBox, and add the Event Box
to the applet object, so we can get tooltips
- Add tooltips (RH #136866)
* src/NetworkManagerDevice.c
- When trying to find a wireless network, try to connect with encryption
turned on first, so that we can more accurately detect whether or not
we need to use encryption for the actual association later on
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@267 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* Add some support for telling NetworkManagerInfo to tell the user
that they are using a device that's not fully supported
* Fix some assertions in debug messages due to null access point args
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@264 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerDevice.c
- Don't try to activate/bring up/down unsupported
devices
* src/NetworkManagerUtils.c
- Fix case of PCI ID checks for driver support levels
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@263 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* NetworkManager.h
- New file, now contains commonly used structures and bits
for the dbus API of NetworkManager
* Makefile.am
- Deliver NetworkManager.h to ${includedir}/NetworkManager
* src/NetworkManager.h
- Rename -> src/NetworkManagerMain.c
* Various fixups all around to use NetworkManager.h and new
src/NetworkManagerMain.h, remove redundant bits that got
moved into NetworkManager.h
* src/NetworkManagerDevice.[ch]
src/NetworkManagerUtils.[ch]
src/NetworkManagerPolicy.c
src/NetworkManagerDbus.c
- Whitelist wireless drivers, and blacklist some wired
drivers. Also blacklist cipsec and ethernet-over-usb
devices at this time (RH #135722, RH #135648)
- Don't leak unsupported devices out over dbus, or allow
them to be set as the active device. Skip over them
during automatic device picking
* test/nmclienttest.c
- Clean up the dbus code a lot
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@261 4912f4e0-d625-0410-9fb7-b9a5a253dbdc