The SDK internally use wchar_t for NSP names even though the
names are actually UTF-8 (since the driver uses UTF-8/ASCII). So
work around that by using the full network name buffer in case
the NSP name is an odd number of characters and thus widechar
comparison functions like wcscmp() would fail when given ASCII.
Heavily modify Inaky's Intel WiMAX SDK glue (originally from connman)
to be more generic and more thread-safe, and suitable for use with
NetworkManager instead of rolling our own client code. Rewrite the
NMDeviceWimax code to mostly work.
Still to be done: actual connection logic, DHCP handling, spawning
wimaxd if it's not started yet
We're just going to quit here anyway, so we don't need to
make sure the property filter is unregistered. Fixes a
crash on exit if D-Bus has quit before NM has.
It's a leftover from when /etc/hosts got fixed up, and since that
isn't being done anymore, there's no reason to touch the hostname
on exit. It will already have been updated in response to device
deactivation (if the hostname was DHCP-provided for example) so
it shouldn't need to be touched on exit.
This also removes a potential crash on shutdown when systemd or
another startup manager kills D-Bus before NetworkManager, which
made the dispatcher code angry (which got executed on hostname
change).
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.
When split DNS is used for a local caching nameserver, make sure
that reverse DNS queries for hosts within the VPN tunnel are directed
to the VPN's nameservers, not to the public upstream nameservers.
RFC6101 adds the DNS Search List option to router advertisements. This
allows stateless configuration of suffixes to try when doing DNS lookups.
Make sure we catch these when provided by the kernel and reconfigure
things appropriately.
NOTE: this commit depends on a kernel patch:
http://marc.info/?l=linux-netdev&m=129216173321352&w=2
RFC5006/RFC6106 specifies fairly clearly how to handle multiple RDDNS options.
Unfortunately the previous code didn't deal with this and hence would
misbehave in all but the simplest setups. The new code should be fully
compliant with the following exceptions:
- Router lifetime not respected
- No "sufficient number" management.
- DHCPv6 servers might not be prioritised over RDDNS ones.
We only want to prevent regression to > READY after READY has
been reached, since the interface state will track the supplicant
connection state which legitimately jumps around.
If we find a "iface ..." line, add the interface to
well_known_interfaces no matter if there is a connection for it or not.
Otherwise we fail to mark devices as unmageded in cases like
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
as NM does not know how to parse such a interface configuration.
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=569215
This branch now requires wpa_supplicant 0.7 or later with the new
D-Bus interface enabled. It also prefers the "nl80211" supplicant
driver over the WEXT one, but will ask the supplicant to fall back
to the WEXT driver if the device in question does not support the
kernel's nl80211/cfg80211 stack.
If the supplicant cannot be service activated, wait until it shows up
on the bus instead of sitting around doing nothing. This fixes a small
regression introduced when the _READY state was added to the supplicant
interface object.
Don't emit "unmanaged-specs-changed" signal in read_one_connection(),
because it causes that next connections are not listed (get_connections() is
called prematurely and only connections read so far are available).
Steps to reproduce the bug:
1) create ifcfg-fake
DEVICE=loremipsum
HWADDR=01:02:03:04:05:06
NM_CONTROLLED=no
2) restart NetworkManager
3) only connections read *before* ifcfg-fake are available
Thanks to Robert Vogelgesang <vogel@users.sourceforge.net> for updating
the patch and analysis!
GATEWAY0=0.0.0.0 was erroneously denied. Also, missing GATEWAY0 entry caused
ifcfg-rh plugin to regard the connection as invalid. The commit fixes that and
makes it behave in accordance with initscripts.