Commit Graph

149 Commits (167028b750028ae3dac24f5ff96bbb1ba04e8bd7)

Author SHA1 Message Date
John Crispin ed2fff7452 hostapd: do not remove foreign wpa_supplicant sockets
https://dev.openwrt.org/ticket/17886

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 42586
10 years ago
Felix Fietkau 7ff276afd3 hostapd: remove bogus default setting for wps_pin (#17873)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 42553
10 years ago
Luka Perkov bc69ee8eab hostapd: fix some whitespaces
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 42111
10 years ago
Jo-Philipp Wich b6153f92ad hostapd: Reintroduce Full Dynamic VLAN support
This patch brings full dynamic vlan support to netifd that existed in hostapd.sh in Attitude Adjustment.

Signed-off-by: Joseph CG Walker <Joe@ChubbyPenguin.net>
[jow@openwrt.org: changed commit message, rebased on top of current hostapd.sh]
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 41872
10 years ago
Felix Fietkau b24e77714e hostapd: add a require_mode option in wifi-device sections to select the minimum hardware mode that the AP requires from clients
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 41665
10 years ago
Felix Fietkau c20bb27aad hostapd: move reading of rsn_preauth out of auth_type=eap context
rsn_preauth is used outside of "case $auth_type", so if it is set
for an EAP-enabled SSID, it would also be set for the following
non-EAP-enabled SSIDs, because it would not be read again.

Signed-off-by: Reiner Herrmann <reiner@reiner-h.de>

SVN-Revision: 41012
10 years ago
Felix Fietkau b8d190da1f hostapd: replace undefined $bridge with $network_bridge
Signed-off-by: Reiner Herrmann <reiner@reiner-h.de>

SVN-Revision: 41002
10 years ago
John Crispin 3bc4516ebb hostapd: Add optional support for hostapd own_ip_addr in wireless config
`own_ip_addr` is used by hostapd as NAS-IP-Address.
This is used to identify the AP that is requesting the authentication of the
user and could be used to define which AP's can authenticate users.
Some vendors implement only NAS-Identifier or NAS-IP-Address and not both.
This patch adds ownip as an optional parameter in /etc/config/wireless.

Signed-off-by: Thomas Wouters <thomaswouters@gmail.com>

SVN-Revision: 40934
10 years ago
Felix Fietkau 26044703a4 hostapd: add an option for 802.11h (enabled by default)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40690
10 years ago
John Crispin 3bc77db5f5 802.11s: fix authsae support in netifd
This patch implements support for 802.11s protected mesh wireless networks (using authsae) in the netifd framework.

Until meshd-nl80211 implements a proper -P option for the PID file, this uses shell backgrounding in order to be able to get the PID for the process.

Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>

SVN-Revision: 40497
10 years ago
Felix Fietkau 0d7e8ba3a9 hostapd: fix "bad number" error due to missing wps_pbc_in_m1 option (since r39995)
r39995 introduced a new parameter wps_pbc_in_m1 to wifi wps config, but
apparently did not provide a default value 0.

When that option's non-existing value is later evaluated in
/lib/netifd/hostapd.sh, it causes the "bad number" error to be logged in
syslog if user has not set the wps_pbc_in_m1 option. The error materialises
only if user has enabled wps.
    Sat Apr 12 13:25:01 2014 daemon.notice netifd: radio1 (1254): sh: bad number
    Sat Apr 12 13:25:01 2014 daemon.notice netifd: radio0 (1253): sh: bad number

Discussion in bug 15508: https://dev.openwrt.org/ticket/15508#comment:3

Error is caused by line 282:
https://dev.openwrt.org/browser/trunk/package/network/services/hostapd/files/netifd.sh#L282

My patch sets the parameter's default value to 0, which does nothing. The
default might also be set a bit later in the function, but this felt like the
most clear place to do that.

Signed-off-by hnyman <hannu.nyman@iki.fi>

SVN-Revision: 40469
10 years ago
Felix Fietkau c53c7a0fe0 hostapd: add pbc_in_m1 option
Option pbc_in_m1 is being used as a WPS capability discovery
workaround for PBC with Windows 7.
Add possibility to enable this workaround from UCI.

To enable it, turn on wps and set wps_pbc_in_m1 parameter to 1.

Signed-off-by: Pawel Kulakowski <pawel.kulakowski@tieto.com>

SVN-Revision: 39995
10 years ago
John Crispin 26e850dafa hostapd: add validation rules to wireless handler
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 39620
10 years ago
Felix Fietkau 38587f87ed wifi: Introduce 802.11ac support
This patch introduces 802.11ac support to mac80211 and hostapd. The split of
VHT160 in two 80 MHz bands is not yet supported, since it requires an
additional user supplied parameter for the channel of the second band.

Signed-off-by: Matti Laakso <malaakso@elisanet.fi>
Signed-off-by: Simon Wunderlich <simon@open-mesh.com>
[sven@open-mesh.com: Rebased patch, merged htmode and vhtmode,
removed special hwmode, replaced uci vht_capab list with overwritable
autoconfig, fixed hostapd integration, fixed commit description, add HT40+/-
for VHT modes, add VHT40 center_freq autoconfig, refactored major parts]
Signed-off-by: Sven Eckelmann <sven@open-mesh.com>

SVN-Revision: 39456
10 years ago
Felix Fietkau 50417b58ad hostapd: do not get basic_rate as a simple string variable
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 39448
10 years ago
Felix Fietkau cfc20090f1 hostapd: fix basic rate list handling with netifd
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 39431
10 years ago
Jo-Philipp Wich b5400c775e hostapd: Fix 80211w setup with netifd
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>

SVN-Revision: 39412
10 years ago
Jo-Philipp Wich c1cb867c13 hostapd: Fix basic_rate setup with netifd
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>

SVN-Revision: 39411
10 years ago
John Crispin 4ae2d6f293 hostapd: fix mcast_rate setting
Introduced by ("netifd: add wireless configuration support and port mac80211 to
the new framework")

Reported-by: René van Weert <r.vanweert@sowifi.com>
Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>

SVN-Revision: 39288
11 years ago
John Crispin 2f9048d8d3 hostapd: fix frequency setting for IBSS/RSN
Introduced by ("netifd: add wireless configuration support and port mac80211 to
the new framework")

Reported-by: René van Weert <rene@sowifi.com>
Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>

SVN-Revision: 39231
11 years ago
Felix Fietkau c7d23cbeb9 hostapd: fix mixed wep/wpa with netifd
Signed-off-by: Catalin Patulea <cat@vv.carleton.ca>

SVN-Revision: 39174
11 years ago
Felix Fietkau da886d761a hostapd: fix the uci option name for ap isolate
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 39173
11 years ago
Felix Fietkau aab522e1e3 hostapd: fix wep with netifd
Signed-off-by: Catalin Patulea <cat@vv.carleton.ca>

SVN-Revision: 39156
11 years ago
Jo-Philipp Wich 32223b3c4d hostapd: fix short_preamble option
SVN-Revision: 39027
11 years ago
Jo-Philipp Wich 18dd101903 hostapd: properly parse wmm and hidden uci options (#14589)
SVN-Revision: 39005
11 years ago
Felix Fietkau 603c532eed hostapd: fix maclist processing with netifd
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 38991
11 years ago
Felix Fietkau 498d84fc4e netifd: add wireless configuration support and port mac80211 to the new framework
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 38988
11 years ago
Felix Fietkau a26242cb63 hostapd: change the wildcard for the hostapd control socket directory
prepare for using /var/run/hostapd instead of /var/run/hostapd-phy*

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 38986
11 years ago
Felix Fietkau 15b4975925 hostapd: add support for auto-channel selection
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 38915
11 years ago
Felix Fietkau cd1c8d463f hostapd: remove random pool support - the entropy it gathers is questionable and we have better entropy sources on common platforms now
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 38852
11 years ago
Jo-Philipp Wich 4f1e282238 wpa_supplicant: fix beacon_int configuration option
wpa_supplicant expects beacon_int instead of beacon_interval in its config
file.

Signed-off-by: Bruno Randolf <br1@einfach.org>

SVN-Revision: 38451
11 years ago
Felix Fietkau ff40bc2db9 hostapd: recognize 8021x as an authentication mode
Currently, in order to configure the authentication daemon in
8021x mode, we need to set wireless.@wifi-iface[0].encryption="wpa"
Though it works it confuses folks as 8021x is using WEP
encryption and not WPA. Therefore the terminology itself is
confusing. This change adds 8021x as a recognized string for 8021x
authentication.

Signed-off-by: Mathieu Olivari <mathieu@qca.qualcomm.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>

SVN-Revision: 38339
11 years ago
Felix Fietkau 9beaea6fc2 hostapd: add external registrar support
Setting wireless.@wifi-iface[N].ext_registrar=1 will enable UPNP
advertising and add an external registrar to the interface this vif
belongs to (br-lan if the vif is included in the LAN bridge). By
enabling this we append upnp_iface=xxx to the hostapd config file.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Mathieu Olivari <mathieu@qca.qualcomm.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>

SVN-Revision: 38338
11 years ago
Felix Fietkau 246e9b449b hostapd: enable WPS2 support on hostapd-full.config
Enable CONFIG_WPS2 for hostapd. This is required to support
options like Virtual Push Button in WPS.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>

SVN-Revision: 38337
11 years ago
Felix Fietkau bcbc9b1e89 hostapd: fix hostapd RSN preauthentication PMKSA caching
In 2009 OpenWrt's hostapd config added an "auth_cache" boolean
to be used to address a reported issue #12129 [0] on a forum [1].
The reported issue on the ticket is different that the one
described on the forum. The commit was r33359. This change broke
proper RSN preauthentication [2] [3] [4] expectations on hostapd's
configuration for WPA2 and this in turn disabled PMKSA caching and
Opportunistic Key Caching. This change:

  * Leaves the "auth_cache" to be used only for WPA networks for those
    looking to use this as a workaround to a reported issue but annotates
    a warning over its usage.

  * Separate "auth_cache" from WPA2 RSN preauthentication, leaving
    WPA2 RSN preauthentication to enabled only with "rsn_preauth" with
    the expected and recommended settings.

  * Adds a new WPA2 RSN preauthentication "rsn_preauth_testing" to
    be used when evaluating funcionality for WPA2 RSN preauthentication
    with the expected and recommended settings with the only difference
    so far with what should be enabled by default to disable Opportunistic
    Key Caching.

Disabling the PMKSA cache should mean the STA could not roam off and back
onto the AP that had PMKSA caching disabled and would require a full
authentication cycle. This fixes this for WPA2 networks with
RSN preauthentication enabled.

This change should be applied to AA as well as trunk.

  TL DR;

The issue described on the forum has to do with failure of a STA
being able to try to authenticate again with the AP if it failed
its first try. This may have been an issue with hostapd in 2009
but as per some tests I cannot reproduce this today on a WPA2
network.

The issue described on the ticket alludes to a security issue with the
design of using a Radius server to authenticate to an AP. The issue
vaguely alludes to the circumstances of zapping a user, deleting their
authentication credentials to log in to the network, and that if
RSN preauthentication is enabled with PMKSA caching that the user
that was zapped would still be able to authenticate.

Lets treat these as separate issues.

I cannot reproduce the first issue reported on the forums of not
being able to authenticate anymore on a WPA2 network.

The issue reported on the ticket modified WPA2 RSN preauthentication
by adding two fields to the hostapd configuration if auth_cache
was enabled:

  * disable_pmksa_caching=1
  * okc=0

The first one disables PMKSA authentication cache.
The second one disables Opportunistic Key Caching.

The issue reported on the ticket was fixed by implementing a workaround
in hostapd's configuration. Disabling PMKSA caching breaks proper use
of WPA2 RSN pre authentication. The usage of disable_pmksa_caching=1
prevents hostapd from adding PMKSA entries into its cache when a successful
802.1x authentication occurs. In practice RSN preauthentication would
trigger a STA to perform authentication with other APs on the same SSID,
it would then have its own supplicant PMKSA cache held. If a STA roams
between one AP to another no new authenitcation would need to be performed
as the new AP would already have authenticated the STA. The purpose of the
PMKSA cache on the AP side would be for the AP to use the same PMKID for
a STA when the STA roams off onto another BSSID and later comes back to it.

Disabling Opportunistic Key Caching could help the reported issue
as well but its not the correct place to address this. Opportunistic
Key Caching enables an AP with different interfaces to share the
PMKSA cache. Its a technical enhancement and disabling it would
be useful to let a testing suite properly test for RSN preauthentication
given that otherwise Opportunistic Key Caching would enable an
interface being tested to derive its own derive the PMKSA entry.
In production though okc=1 should be enabled to help with RSN
preauthentication.

The real fix for this particular issue outside of the scope of hostapd's
configuration and it should not be dealt with as a workaround to
its configuration and breaking expected RSN preauthentication and
technical optimizations. Revert this change and enable users to pick
and choose to enable or disable disable_pmksa_caching and okc expecting them
to instead have read clearly more what these do.

As for the core issure ported, the correct place to fix this is to
enable a sort of messaging between the RADIUS server and its peers
so that if caching for authentication is enabled that cache can be
cleared upon user credential updates. Updating a user password
(not just zapping a user) is another possible issue that would need
to be resolved here. Another part of the solution might be to reduce
the cache timing to account for any systematic limitations (RADIUS
server not able to ask peers to clear cache might be
one).

[0] https://dev.openwrt.org/changeset/33359
[1] https://forum.openwrt.org/viewtopic.php?id=19596
[2] http://wireless.kernel.org/en/users/Documentation/hostapd#IEEE_802.11i.2FRSN.2FWPA2_pre-authentication
[3] http://wireless.kernel.org/en/users/Documentation/wpa_supplicant#RSN_preauthentication
[4] http://wiki.openwrt.org/doc/recipes/rsn_preauthentication

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>

SVN-Revision: 38336
11 years ago
Felix Fietkau 40aec9ed46 hostapd: Add WPS unconfigured & WPS pin method support
Signed-off-by: Mathieu Olivari <mathieu@qca.qualcomm.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>

SVN-Revision: 38335
11 years ago
Felix Fietkau 4689bc8517 hostapd: Add eap_reauth_period config option
This adds the eap_reauth_period to be used for modifying
the RADIUS server reauthentication authentication period,
a parameter that gets passed directly to the hostapd
configuration file.

Signed-off-by: Mathieu Olivari <mathieu@qca.qualcomm.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>

SVN-Revision: 38334
11 years ago
Felix Fietkau 750197b3af hostapd: add a build variant for wpa_supplicant with p2p (aka Wi-Fi Direct) support
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 37739
11 years ago
Felix Fietkau 9a22315ca4 hostapd: Settings for DAE/CoA server
hostapd supports "Dynamic Authorization Extensions", making it possible
to forcibly disconnect a user by sending it a RADIUS "Disconnect-Request"
packet.

I've added three new variables to enable setting of the
"radius_das_client" and "radius_das_port" variables in the hostapd
configuration, which enable these extensions.

* dae_client - IP of the client that can send disconnect requests
* dae_secret - shared secret for DAE packets

These are combined into the "radius_das_client" option in hostapd.conf
To enable the server, both dae_client and dae_secret must be set.

* dae_port - optional, default value is 3799 as specified in RFC 5176

Signed-off-by: Martijn van de Streek <martijn@vandestreek.net>

SVN-Revision: 37734
11 years ago
Jo-Philipp Wich 7c197d9f0e hostapd: truncate default mac file before adding entries to it (#13797)
SVN-Revision: 37114
11 years ago
Jo-Philipp Wich 541fbfbb9e hostapd: correctly handle macfile uci option
Make hostapd.sh correctly handle the macfile uci option.

Such option specifies the macfile name to pass into the
hostapd configuration file. Moreover, if a maclist option
has been specified, copy the macfile before appending new
entries.

Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>

SVN-Revision: 36944
11 years ago
Felix Fietkau b85c442e81 hostapd: enable 802.11r for the -full variant (#13250)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 36533
11 years ago
Felix Fietkau 2167101c90 hostapd: initial prototype of an ubus binding
Supports listing, removing and banning clients, and hooking into
probe/assoc/auth requests via object subscribe.

SVN-Revision: 36081
11 years ago
John Crispin fce3deddff use new button scheme
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 36004
11 years ago
Felix Fietkau 1810b80ec0 mac80211/hostapd: short_preamble is a per-vif option and should be enabled by default
SVN-Revision: 35565
11 years ago
Jo-Philipp Wich e804a663e3 hostapd: don't configure wpa_supplicant with empty password="" if no password is specified (#12912)
SVN-Revision: 35358
11 years ago
Felix Fietkau 056d75049d wpa_supplicant.sh: always use parameters from the current section
Using variables from the outer scope unnecessarily complicates the code and
leads to issues.

This patch fixes the bug when having an "adhoc" wifi-iface section before a
"sta" section prevents wpa_supplicant from using the key specified in the
corresponding section as it tries to use the "adhoc" key instead (1 by
default).

Signed-off-by: Paul Fertser <fercerpav@gmail.com>

SVN-Revision: 34716
12 years ago
Felix Fietkau 8516ddb133 mac80211, hostapd: Fix macfilter for multi bssid setups
Previously only the first macfilter configuration would have been used
on all interfaces. However, the configuration was always done per vif
already. Hence, move the macfilter setup into hostapd.sh where and
create one mac list file per vif.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>

SVN-Revision: 34470
12 years ago
Felix Fietkau 405e21d167 packages: sort network related packages into package/network/
SVN-Revision: 33688
12 years ago