~ubuntu-branches/ubuntu/trusty/wpa/trusty

« back to all changes in this revision

Viewing changes to wpa_supplicant/README

  • Committer: Package Import Robot
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2014-03-04 16:13:24 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20140304161324-md40gw8imcectbuu
Tags: 2.1-0ubuntu1
* New upstream release (LP: #1099755)
* debian/get-orig-source: update for new git repository for the current
  hostap/wpasupplicant versions.
* Dropped patches due to being applied upstream and included in the current
  source tarball:
  - debian/patches/11_wpa_gui_ftbfs_gcc_4_7.patch
  - debian/patches/13_human_readable_signal.patch
  - debian/patches/git_deinit_p2p_context_on_mgmt_remove_ff1f9c8.patch
  - debian/patches/libnl3-includes.patch
* debian/patches/git_accept_client_cert_from_server.patch: revert the commit:
  "OpenSSL: Do not accept SSL Client certificate for server", which breaks
  many AAA servers that include both client and server EKUs. Cherry-picked
  from hostap git commit b62d5b5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
WPA Supplicant
2
2
==============
3
3
 
4
 
Copyright (c) 2003-2012, Jouni Malinen <j@w1.fi> and contributors
 
4
Copyright (c) 2003-2014, Jouni Malinen <j@w1.fi> and contributors
5
5
All Rights Reserved.
6
6
 
7
 
This program is dual-licensed under both the GPL version 2 and BSD
8
 
license. Either license may be used at your option.
 
7
This program is licensed under the BSD license (the one with
 
8
advertisement clause removed).
 
9
 
 
10
If you are submitting changes to the project, please see CONTRIBUTIONS
 
11
file for more instructions.
9
12
 
10
13
 
11
14
 
12
15
License
13
16
-------
14
17
 
15
 
GPL v2:
16
 
 
17
 
This program is free software; you can redistribute it and/or modify
18
 
it under the terms of the GNU General Public License version 2 as
19
 
published by the Free Software Foundation.
20
 
 
21
 
This program is distributed in the hope that it will be useful,
22
 
but WITHOUT ANY WARRANTY; without even the implied warranty of
23
 
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24
 
GNU General Public License for more details.
25
 
 
26
 
You should have received a copy of the GNU General Public License
27
 
along with this program; if not, write to the Free Software
28
 
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
29
 
 
30
 
(this copy of the license is in COPYING file)
31
 
 
32
 
 
33
 
Alternatively, this software may be distributed, used, and modified
34
 
under the terms of BSD license:
 
18
This software may be distributed, used, and modified under the terms of
 
19
BSD license:
35
20
 
36
21
Redistribution and use in source and binary forms, with or without
37
22
modification, are permitted provided that the following conditions are
130
115
- NetBSD-current
131
116
- Microsoft Windows with WinPcap (at least WinXP, may work with other versions)
132
117
- drivers:
 
118
        Linux drivers that support cfg80211/nl80211. Even though there are
 
119
        number of driver specific interface included in wpa_supplicant, please
 
120
        note that Linux drivers are moving to use generic wireless configuration
 
121
        interface driver_nl80211 (-Dnl80211 on wpa_supplicant command line)
 
122
        should be the default option to start with before falling back to driver
 
123
        specific interface.
 
124
 
133
125
        Linux drivers that support WPA/WPA2 configuration with the generic
134
 
        Linux wireless extensions (WE-18 or newer). Even though there are
135
 
        number of driver specific interface included in wpa_supplicant, please
136
 
        note that Linux drivers are moving to use generic wireless extensions
137
 
        and driver_wext (-Dwext on wpa_supplicant command line) should be the
138
 
        default option to start with before falling back to driver specific
139
 
        interface.
140
 
 
141
 
        Host AP driver for Prism2/2.5/3 (development snapshot/v0.2.x)
142
 
        (http://hostap.epitest.fi/)
143
 
        Driver need to be set in Managed mode ('iwconfig wlan0 mode managed').
144
 
        Please note that station firmware version needs to be 1.7.0 or newer
145
 
        to work in WPA mode.
146
 
 
147
 
        Linuxant DriverLoader (http://www.linuxant.com/driverloader/)
148
 
        with Windows NDIS driver for your wlan card supporting WPA.
149
 
 
150
 
        madwifi driver for cards based on Atheros chip set (ar521x)
151
 
        (http://sourceforge.net/projects/madwifi/)
152
 
        Please note that you will need to modify the wpa_supplicant .config
153
 
        file to use the correct path for the madwifi driver root directory
154
 
        (CFLAGS += -I../madwifi/wpa line in example defconfig).
155
 
 
156
 
        Linux ndiswrapper (http://ndiswrapper.sourceforge.net/) with
157
 
        Windows NDIS driver.
158
 
 
159
 
        Broadcom wl.o driver (old version only)
160
 
        This is a generic Linux driver for Broadcom IEEE 802.11a/g cards.
161
 
        However, it is proprietary driver that is not publicly available
162
 
        except for couple of exceptions, mainly Broadcom-based APs/wireless
163
 
        routers that use Linux. The driver binary can be downloaded, e.g.,
164
 
        from Linksys support site (http://www.linksys.com/support/gpl.asp)
165
 
        for Linksys WRT54G. The GPL tarball includes cross-compiler and
166
 
        the needed header file, wlioctl.h, for compiling wpa_supplicant.
167
 
        This driver support in wpa_supplicant is expected to work also with
168
 
        other devices based on Broadcom driver (assuming the driver includes
169
 
        client mode support). Please note that the newer Broadcom driver
170
 
        ("hybrid Linux driver") supports Linux wireless extensions and does
171
 
        not need (or even work) with the specific driver wrapper. Use -Dwext
172
 
        with that driver.
 
126
        Linux wireless extensions (WE-18 or newer). Obsoleted by nl80211.
173
127
 
174
128
        In theory, any driver that supports Linux wireless extensions can be
175
129
        used with IEEE 802.1X (i.e., not WPA) when using ap_scan=0 option in
347
301
The build time configuration can be used to select only the needed
348
302
features and limit the binary size and requirements for external
349
303
libraries. The main configuration parts are the selection of which
350
 
driver interfaces (e.g., hostap, madwifi, ..) and which authentication
 
304
driver interfaces (e.g., nl80211, wext, ..) and which authentication
351
305
methods (e.g., EAP-TLS, EAP-PEAP, ..) are included.
352
306
 
353
307
Following build time configuration options are used to control IEEE
382
336
Following options can be added to .config to select which driver
383
337
interfaces are included.
384
338
 
385
 
CONFIG_DRIVER_HOSTAP=y
386
 
CONFIG_DRIVER_MADWIFI=y
 
339
CONFIG_DRIVER_NL80211=y
387
340
CONFIG_DRIVER_WEXT=y
388
 
CONFIG_DRIVER_RALINK=y
389
 
CONFIG_DRIVER_BROADCOM=y
390
341
CONFIG_DRIVER_BSD=y
391
342
CONFIG_DRIVER_NDIS=y
392
343
 
393
 
Following example includes all features and driver interfaces that are
394
 
included in the wpa_supplicant package:
 
344
Following example includes some more features and driver interfaces that
 
345
are included in the wpa_supplicant package:
395
346
 
396
 
CONFIG_DRIVER_HOSTAP=y
397
 
CONFIG_DRIVER_MADWIFI=y
 
347
CONFIG_DRIVER_NL80211=y
398
348
CONFIG_DRIVER_WEXT=y
399
 
CONFIG_DRIVER_BROADCOM=y
400
349
CONFIG_DRIVER_BSD=y
401
350
CONFIG_DRIVER_NDIS=y
402
351
CONFIG_IEEE8021X_EAPOL=y
461
410
 
462
411
usage:
463
412
  wpa_supplicant [-BddfhKLqqtuvwW] [-P<pid file>] [-g<global ctrl>] \
 
413
        [-G<group>] \
464
414
        -i<ifname> -c<config file> [-C<ctrl>] [-D<driver>] [-p<driver_param>] \
465
415
        [-b<br_ifname> [-N -i<ifname> -c<conf> [-C<ctrl>] [-D<driver>] \
466
416
        [-p<driver_param>] [-b<br_ifname>] ...]
475
425
  -D = driver name (can be multiple drivers: nl80211,wext)
476
426
  -f = Log output to default log location (normally /tmp)
477
427
  -g = global ctrl_interface
 
428
  -G = global ctrl_interface group
478
429
  -K = include keys (passwords, etc.) in debug output
479
430
  -t = include timestamp in debug messages
480
431
  -h = show this help text
481
 
  -L = show license (GPL and BSD)
 
432
  -L = show license (BSD)
482
433
  -p = driver parameters
483
434
  -P = PID file
484
435
  -q = decrease debugging verbosity (-qq even less)
489
440
  -N = start describing new interface
490
441
 
491
442
drivers:
492
 
  hostap = Host AP driver (Intersil Prism2/2.5/3) [default]
493
 
        (this can also be used with Linuxant DriverLoader)
494
 
  madwifi = MADWIFI 802.11 support (Atheros, etc.) (deprecated; use wext)
 
443
  nl80211 = Linux nl80211/cfg80211
495
444
  wext = Linux wireless extensions (generic)
496
 
  ralink = Ralink Client driver
497
 
  broadcom = Broadcom wl.o driver
498
445
  wired = wpa_supplicant wired Ethernet driver
499
446
  roboswitch = wpa_supplicant Broadcom switch driver
500
447
  bsd = BSD 802.11 support (Atheros, etc.)
527
474
start wpa_supplicant for two interfaces:
528
475
 
529
476
wpa_supplicant \
530
 
        -c wpa1.conf -i wlan0 -D hostap -N \
531
 
        -c wpa2.conf -i ath0 -D madwifi
 
477
        -c wpa1.conf -i wlan0 -D nl80211 -N \
 
478
        -c wpa2.conf -i wlan1 -D wext
532
479
 
533
480
 
534
481
If the interface is added in a Linux bridge (e.g., br0), the bridge
535
482
interface needs to be configured to wpa_supplicant in addition to the
536
483
main interface:
537
484
 
538
 
wpa_supplicant -cw.conf -Dmadwifi -iath0 -bbr0
 
485
wpa_supplicant -cw.conf -Dnl80211 -iwlan0 -bbr0
539
486
 
540
487
 
541
488
Configuration file
927
874
# Start wpa_supplicant in the background
928
875
wpa_supplicant -g/var/run/wpa_supplicant-global -B
929
876
 
930
 
# Add a new interface (wlan0, no configuration file, driver=wext, and
 
877
# Add a new interface (wlan0, no configuration file, driver=nl80211, and
931
878
# enable control interface)
932
879
wpa_cli -g/var/run/wpa_supplicant-global interface_add wlan0 \
933
 
        "" wext /var/run/wpa_supplicant
 
880
        "" nl80211 /var/run/wpa_supplicant
934
881
 
935
882
# Configure a network using the newly added network interface:
936
883
wpa_cli -iwlan0 add_network
991
938
  chmod 0750 /var/run/wpa_priv
992
939
- start wpa_priv as root (e.g., from system startup scripts) with the
993
940
  enabled interfaces configured on the command line:
994
 
  wpa_priv -B -P /var/run/wpa_priv.pid wext:ath0
 
941
  wpa_priv -B -P /var/run/wpa_priv.pid nl80211:wlan0
995
942
- run wpa_supplicant as non-root with a user that is in wpapriv group:
996
943
  wpa_supplicant -i ath0 -c wpa_supplicant.conf
997
944
 
1002
949
wpa_priv can control multiple interface with one process, but it is
1003
950
also possible to run multiple wpa_priv processes at the same time, if
1004
951
desired.
 
952
 
 
953
 
 
954
Linux capabilities instead of privileged process
 
955
------------------------------------------------
 
956
 
 
957
wpa_supplicant performs operations that need special permissions, e.g.,
 
958
to control the network connection. Traditionally this has been achieved
 
959
by running wpa_supplicant as a privileged process with effective user id
 
960
0 (root). Linux capabilities can be used to provide restricted set of
 
961
capabilities to match the functions needed by wpa_supplicant. The
 
962
minimum set of capabilities needed for the operations is CAP_NET_ADMIN
 
963
and CAP_NET_RAW.
 
964
 
 
965
setcap(8) can be used to set file capabilities. For example:
 
966
 
 
967
sudo setcap cap_net_raw,cap_net_admin+ep wpa_supplicant
 
968
 
 
969
Please note that this would give anyone being able to run that
 
970
wpa_supplicant binary access to the additional capabilities. This can
 
971
further be limited by file owner/group and mode bits. For example:
 
972
 
 
973
sudo chown wpas wpa_supplicant
 
974
sudo chmod 0100 wpa_supplicant
 
975
 
 
976
This combination of setcap, chown, and chmod commands would allow wpas
 
977
user to execute wpa_supplicant with additional network admin/raw
 
978
capabilities.
 
979
 
 
980
Common way style of creating a control interface socket in
 
981
/var/run/wpa_supplicant could not be done by this user, but this
 
982
directory could be created before starting the wpa_supplicant and set to
 
983
suitable mode to allow wpa_supplicant to create sockets
 
984
there. Alternatively, other directory or abstract socket namespace could
 
985
be used for the control interface.
 
986
 
 
987
 
 
988
External requests for radio control
 
989
-----------------------------------
 
990
 
 
991
External programs can request wpa_supplicant to not start offchannel
 
992
operations during other tasks that may need exclusive control of the
 
993
radio. The RADIO_WORK control interface command can be used for this.
 
994
 
 
995
"RADIO_WORK add <name> [freq=<MHz>] [timeout=<seconds>]" command can be
 
996
used to reserve a slot for radio access. If freq is specified, other
 
997
radio work items on the same channel may be completed in
 
998
parallel. Otherwise, all other radio work items are blocked during
 
999
execution. Timeout is set to 10 seconds by default to avoid blocking
 
1000
wpa_supplicant operations for excessive time. If a longer (or shorter)
 
1001
safety timeout is needed, that can be specified with the optional
 
1002
timeout parameter. This command returns an identifier for the radio work
 
1003
item.
 
1004
 
 
1005
Once the radio work item has been started, "EXT-RADIO-WORK-START <id>"
 
1006
event message is indicated that the external processing can start. Once
 
1007
the operation has been completed, "RADIO_WORK done <id>" is used to
 
1008
indicate that to wpa_supplicant. This allows other radio works to be
 
1009
performed. If this command is forgotten (e.g., due to the external
 
1010
program terminating), wpa_supplicant will time out the radio owrk item
 
1011
and send "EXT-RADIO-WORK-TIMEOUT <id>" event ot indicate that this has
 
1012
happened. "RADIO_WORK done <id>" can also be used to cancel items that
 
1013
have not yet been started.
 
1014
 
 
1015
For example, in wpa_cli interactive mode:
 
1016
 
 
1017
> radio_work add test
 
1018
1
 
1019
<3>EXT-RADIO-WORK-START 1
 
1020
> radio_work show
 
1021
ext:test@wlan0:0:1:2.487797
 
1022
> radio_work done 1
 
1023
OK
 
1024
> radio_work show
 
1025
 
 
1026
 
 
1027
> radio_work done 3
 
1028
OK
 
1029
> radio_work show
 
1030
ext:test freq=2412 timeout=30@wlan0:2412:1:28.583483
 
1031
<3>EXT-RADIO-WORK-TIMEOUT 2
 
1032
 
 
1033
 
 
1034
> radio_work add test2 freq=2412 timeout=60
 
1035
5
 
1036
<3>EXT-RADIO-WORK-START 5
 
1037
> radio_work add test3
 
1038
6
 
1039
> radio_work add test4
 
1040
7
 
1041
> radio_work show
 
1042
ext:test2 freq=2412 timeout=60@wlan0:2412:1:9.751844
 
1043
ext:test3@wlan0:0:0:5.071812
 
1044
ext:test4@wlan0:0:0:3.143870
 
1045
> radio_work done 6
 
1046
OK
 
1047
> radio_work show
 
1048
ext:test2 freq=2412 timeout=60@wlan0:2412:1:16.287869
 
1049
ext:test4@wlan0:0:0:9.679895
 
1050
> radio_work done 5
 
1051
OK
 
1052
<3>EXT-RADIO-WORK-START 7
 
1053
<3>EXT-RADIO-WORK-TIMEOUT 7