File: README

package info (click to toggle)
crda 4.14%2Bgit20191112.9856751-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 568 kB
  • sloc: ansic: 2,599; makefile: 195; python: 130; sh: 6
file content (106 lines) | stat: -rw-r--r-- 4,121 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
 Central Regulatory Domain Agent (CRDA)
========================================
<https://wireless.wiki.kernel.org/en/developers/regulatory/crda>

This is the Central Regulatory Domain Agent for Linux. It serves one
purpose: tell Linux kernel what regulatory ruels to enforce for 802.11.

CRDA is no longer needed as of kernel v4.15 since commit 007f6c5e6eb45
("cfg80211: support loading regulatory database as firmware file") added
support to use the kernel's firmware request API which looks for the
firmware on /lib/firmware. Because of this CRDA is legacy software for
older kernels. It will continue to be maintained.

CRDA is a udev helper for communication between the kernel and userspace. You
only need to run this manually for debugging purposes. For manual changing of
regulatory domains use iw (iw reg set) or wpa_supplicant.

 HOST REQUIREMENTS
===================

CRDA is provided as a binary file so all the host needs is libc/uclibc.
You will also need udev and at least libnl1.

 BUILD REQUIREMENTS
====================

The package build requirements currently are:

 * python and the m2crypto package (python-m2crypto)
 * libgcrypt or libssl (openssl) header files
 * nl library and header files (libnl1 and libnl-dev)
   available at git://git.kernel.org/pub/scm/libs/netlink/libnl.git
 * RSA public key of John Linville and Seth Forshee, we include these
   as part of this package so you do not need to install it. The RSA
   public keys comes from the wireless-regdb.git tree and we keep them
   up to date here.
 * regulatory database, clone this tree:

   git://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git

   and then stuff regulatory.bin (no need to build) provided there in
   REG_BIN location specified in this Makefile. This regulatory.bin file
   is only required to verify the CRDA built here can read its database file
   which has been signed with the RSA private key.

 CALLING CRDA -- UDEV
======================

Distributions can set up a udev rule to allow the kernel's regulatory
domain change request to be reviewed by CRDA so CRDA can pass an
appropriate regulatory domain. An example regulatory rule is provided
with this package as regulatory.rules

 OVERVIEW
==========
<https://wireless.wiki.kernel.org/en/developers/regulatory>

The database is maintained on the wireless-regdb.git tree. This git
tree maintains a binary regulatory database file which is produced
using its own ASCII db.txt into binary form for size efficiency. The
contents of the binary database are then signed using the private key.

CRDA will use regulatory.bin if its signature checks out with the public
key provided. This will prevent us from using corrupted data (in case
of hard drive failure) in the running kernel. This separation between
CRDA and the regulatory database also allows us to provide regulatory
updates on distributions without having to require an update on CRDA.

Note that upon updating the regulatory database it is advised the
user reboots or all the wireless modules get unloaded and reloaded.

Under certain circumstances it may be desirable to have the regulatory
agent accept multiple keys, this can be achieved by stuffing all the keys
desired into pubkeys. Right now we use John Linville's and Seth Forshee's
public keys.

 REGDB AUTHORS
===============

Authors of regulatory.bin first need a private key, which can be generated
with something like this:

	openssl genrsa -out your.key.priv.pem 2048

You'll then need to generate the public key and publish it. You
can generate it as follows:

	openssl rsa -in your.key.priv.pem -out your.key.pub.pem -pubout -outform PEM

Then with this key you can generate regulatory.bin files like this:

	./utils/db2bin.py regulatory.bin db.txt your.key.priv.pem

 MAGIC PATTERN
===============

Use the following magic(5) pattern to recognise CRDA binary regulatory
database files:

---- %< ----
# CRDA Regulatory database file
# http://git.kernel.org/?p=linux/kernel/git/mcgrof/crda.git;a=summary
# (see regdb.h)
0	belong		0x52474442	CRDA regulatory database file
>4	belong		19		(Version 1)
---- >% ----