The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Loading...
Searching...
No Matches
rlm_wimax.c
Go to the documentation of this file.
1/*
2 * This program is is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or (at
5 * your option) any later version.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
15 */
16
17/**
18 * $Id: e1876b02d9ccee885ffae9fb99446de14bf6cd8c $
19 * @file rlm_wimax.c
20 * @brief Supports various WiMax functionality.
21 *
22 * @copyright 2008 Alan DeKok (aland@networkradius.com)
23 */
24RCSID("$Id: e1876b02d9ccee885ffae9fb99446de14bf6cd8c $")
25USES_APPLE_DEPRECATED_API /* OpenSSL API has been deprecated by Apple */
26
27#define LOG_PREFIX "wimax"
28
29#include <freeradius-devel/server/base.h>
30#include <freeradius-devel/server/module_rlm.h>
31#include <freeradius-devel/tls/base.h>
32#include <freeradius-devel/util/base16.h>
33
34/*
35 * FIXME: Add check for this header to configure.ac
36 */
37#include <openssl/hmac.h>
38
39/*
40 * FIXME: Fix the build system to create definitions from names.
41 */
42typedef struct {
45
46static const conf_parser_t module_config[] = {
47 { FR_CONF_OFFSET("delete_mppe_keys", rlm_wimax_t, delete_mppe_keys), .dflt = "no" },
49};
50
51static fr_dict_t const *dict_radius;
53
56 { .out = &dict_radius, .proto = "radius" },
57 { .out = &dict_freeradius, .proto = "freeradius" },
59};
60
64
66
80
83
86 { .out = &attr_eap_emsk, .name = "EAP-EMSK", .type = FR_TYPE_OCTETS, .dict = &dict_freeradius },
87 { .out = &attr_eap_msk, .name = "EAP-MSK", .type = FR_TYPE_OCTETS, .dict = &dict_freeradius },
88 { .out = &attr_wimax_mn_nai, .name = "WiMAX-MN-NAI", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
89
90 { .out = &attr_calling_station_id, .name = "Calling-Station-ID", .type = FR_TYPE_STRING, .dict = &dict_radius },
91
92 /*
93 * Load this, but we don't use it.
94 */
95 { .out = NULL, .name = "Vendor-Specific.WiMAX", .type = FR_TYPE_VENDOR, .dict = &dict_radius },
96
97 /*
98 * Relative names are shorter.
99 */
100 { .out = &attr_wimax_msk, .name = ".MSK", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
101 { .out = &attr_wimax_ip_technology, .name = ".IP-Technology", .type = FR_TYPE_UINT32, .dict = &dict_radius },
102 { .out = &attr_wimax_mn_hha_mip4_key, .name = ".MN-hHA-MIP4-Key", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
103 { .out = &attr_wimax_mn_hha_mip4_spi, .name = ".MN-hHA-MIP4-SPI", .type = FR_TYPE_UINT32, .dict = &dict_radius },
104 { .out = &attr_wimax_hha_ip_mip4, .name = ".hHA-IP-MIP4", .type = FR_TYPE_IPV4_ADDR, .dict = &dict_radius },
105 { .out = &attr_wimax_hha_ip_mip6, .name = ".hHA-IP-MIP6", .type = FR_TYPE_IPV6_ADDR, .dict = &dict_radius },
106 { .out = &attr_wimax_mn_hha_mip6_key, .name = ".MN-hHA-MIP6-Key", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
107 { .out = &attr_wimax_mn_hha_mip6_spi, .name = ".MN-hHA-MIP6-SPI", .type = FR_TYPE_UINT32, .dict = &dict_radius },
108 { .out = &attr_wimax_fa_rk_key, .name = ".FA-RK-Key", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
109 { .out = &attr_wimax_fa_rk_spi, .name = ".FA-RK-SPI", .type = FR_TYPE_UINT32, .dict = &dict_radius },
110 { .out = &attr_wimax_rrq_mn_ha_spi, .name = ".RRQ-MN-HA-SPI", .type = FR_TYPE_UINT32, .dict = &dict_radius },
111 { .out = &attr_wimax_rrq_ha_ip, .name = ".RRQ-HA-IP", .type = FR_TYPE_COMBO_IP_ADDR, .dict = &dict_radius },
112 { .out = &attr_wimax_ha_rk_key_requested, .name = ".HA-RK-Key-Requested", .type = FR_TYPE_UINT32, .dict = &dict_radius },
113
114 { .out = &attr_ms_mppe_send_key, .name = "Vendor-Specific.Microsoft.MPPE-Send-Key", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
115 { .out = &attr_ms_mppe_recv_key, .name = "Vendor-Specific.Microsoft.MPPE-Recv-Key", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
116
118};
119
120/*
121 * Find the named user in this modules database. Create the set
122 * of attribute-value pairs to check and reply with for this user
123 * from the database. The authentication code only needs to check
124 * the password, the rest is done here.
125 */
126static unlang_action_t CC_HINT(nonnull) mod_authorize(unlang_result_t *p_result, UNUSED module_ctx_t const *mctx, request_t *request)
127{
128 fr_pair_t *vp;
129
130 /*
131 * Fix Calling-Station-Id. Damn you, WiMAX!
132 */
133 vp = fr_pair_find_by_da(&request->request_pairs, NULL, attr_calling_station_id);
134 if (vp && (vp->vp_length == 6)) {
135 int i;
136 char *p;
137 uint8_t buffer[6];
138
139 memcpy(buffer, vp->vp_strvalue, 6);
140
141 MEM(fr_pair_value_bstr_realloc(vp, &p, (5 * 3) + 2) == 0);
142
143 /*
144 * RFC 3580 Section 3.20 says this is the preferred
145 * format. Everyone *SANE* is using this format,
146 * so we fix it here.
147 */
148 for (i = 0; i < 6; i++) {
149 fr_base16_encode(&FR_SBUFF_OUT(&p[i * 3], 2 + 1), &FR_DBUFF_TMP(&buffer[i], 1));
150 if (i < 5) p[(i * 3) + 2] = '-';
151 }
152
153 DEBUG2("Fixing WiMAX binary Calling-Station-Id to %pV", &vp->data);
155 }
156
158}
159
160/*
161 * Massage the request before recording it or proxying it
162 */
163static unlang_action_t CC_HINT(nonnull) mod_preacct(unlang_result_t *p_result, module_ctx_t const *mctx, request_t *request)
164{
165 return mod_authorize(p_result, mctx, request);
166}
167
168/*
169 * Generate the keys after the user has been authenticated.
170 */
171static unlang_action_t CC_HINT(nonnull) mod_post_auth(unlang_result_t *p_result, module_ctx_t const *mctx, request_t *request)
172{
174 fr_pair_t *msk, *emsk, *vp;
175 fr_pair_t *mn_nai, *ip, *fa_rk;
176 EVP_MD_CTX *hmac_ctx;
177 EVP_PKEY *hmac_pkey;
178 uint32_t mip_spi;
179 uint8_t usage_data[24];
180 uint8_t mip_rk_1[EVP_MAX_MD_SIZE], mip_rk_2[EVP_MAX_MD_SIZE];
181 uint8_t mip_rk[2 * EVP_MAX_MD_SIZE];
182 size_t rk1_len = sizeof(mip_rk_1), rk2_len = sizeof(mip_rk_2), rk_len = sizeof(mip_rk);
183
184 msk = fr_pair_find_by_da(&request->reply_pairs, NULL, attr_eap_msk);
185 emsk = fr_pair_find_by_da(&request->reply_pairs, NULL, attr_eap_emsk);
186 if (!msk || !emsk) {
187 REDEBUG2("No EAP-MSK or EAP-EMSK. Cannot create WiMAX keys");
189 }
190
191 /*
192 * If we delete the MS-MPPE-*-Key attributes, then add in
193 * the WiMAX-MSK so that the client has a key available.
194 */
195 if (inst->delete_mppe_keys) {
198
200 fr_pair_value_memdup(vp, msk->vp_octets, msk->vp_length, false);
201 }
202
203 /*
204 * Initialize usage data.
205 */
206 memcpy(usage_data, "miprk@wimaxforum.org", 21); /* with trailing \0 */
207 usage_data[21] = 0x02;
208 usage_data[22] = 0x00;
209 usage_data[23] = 0x01;
210
211 /*
212 * MIP-RK-1 = HMAC-SSHA256(EMSK, usage-data | 0x01)
213 */
214 MEM(hmac_ctx = EVP_MD_CTX_new());
215 MEM(hmac_pkey = EVP_PKEY_new_mac_key(EVP_PKEY_HMAC, NULL, emsk->vp_octets, emsk->vp_length));
216 EVP_DigestSignInit(hmac_ctx, NULL, EVP_sha256(), NULL, hmac_pkey);
217
218 EVP_DigestSignUpdate(hmac_ctx, &usage_data[0], sizeof(usage_data));
219 EVP_DigestSignFinal(hmac_ctx, &mip_rk_1[0], &rk1_len);
220
221 /*
222 * MIP-RK-2 = HMAC-SSHA256(EMSK, MIP-RK-1 | usage-data | 0x01)
223 */
224 EVP_MD_CTX_reset(hmac_ctx);
225 EVP_DigestSignInit(hmac_ctx, NULL, EVP_sha256(), NULL, hmac_pkey);
226
227 EVP_DigestSignUpdate(hmac_ctx, (uint8_t const *) &mip_rk_1, rk1_len);
228 EVP_DigestSignUpdate(hmac_ctx, &usage_data[0], sizeof(usage_data));
229 EVP_DigestSignFinal(hmac_ctx, &mip_rk_2[0], &rk2_len);
230
231 memcpy(mip_rk, mip_rk_1, rk1_len);
232 memcpy(mip_rk + rk1_len, mip_rk_2, rk2_len);
233 rk_len = rk1_len + rk2_len;
234
235 /*
236 * MIP-SPI = HMAC-SSHA256(MIP-RK, "SPI CMIP PMIP");
237 */
238 EVP_MD_CTX_reset(hmac_ctx);
239 EVP_PKEY_free(hmac_pkey); /* No way to reset ? */
240 MEM(hmac_pkey = EVP_PKEY_new_mac_key(EVP_PKEY_HMAC, NULL, mip_rk, rk_len));
241 EVP_DigestSignInit(hmac_ctx, NULL, EVP_sha256(), NULL, hmac_pkey);
242
243 EVP_DigestSignUpdate(hmac_ctx, (uint8_t const *) "SPI CMIP PMIP", 13);
244 EVP_DigestSignFinal(hmac_ctx, &mip_rk_1[0], &rk1_len);
245
246 /*
247 * Take the 4 most significant octets.
248 * If less than 256, add 256.
249 */
250 mip_spi = fr_nbo_to_uint32(mip_rk_1);
251 if (mip_spi < 256) mip_spi += 256;
252
253 REDEBUG2("MIP-RK = 0x%pH", fr_box_octets(mip_rk, rk_len));
254 REDEBUG2("MIP-SPI = %08x", ntohl(mip_spi));
255
256 /*
257 * FIXME: Perform SPI collision prevention
258 */
259
260 /*
261 * Calculate mobility keys
262 */
263 mn_nai = fr_pair_find_by_da(&request->request_pairs, NULL, attr_wimax_mn_nai);
264 if (!mn_nai) mn_nai = fr_pair_find_by_da(&request->reply_pairs, NULL, attr_wimax_mn_nai);
265 if (!mn_nai) {
266 RWDEBUG("%s was not found in the request or in the reply", attr_wimax_mn_nai->name);
267 RWDEBUG("We cannot calculate MN-HA keys");
268 }
269
270 /*
271 * WiMAX-IP-Technology
272 */
273 vp = NULL;
274 if (mn_nai) vp = fr_pair_find_by_da_nested(&request->reply_pairs, NULL, attr_wimax_ip_technology);
275 if (!vp) {
276 RWDEBUG("%s not found in reply", attr_wimax_ip_technology->name);
277 RWDEBUG("Not calculating MN-HA keys");
278 }
279
280 if (vp) switch (vp->vp_uint32) {
281 case 2: /* PMIP4 */
282 /*
283 * Look for WiMAX-hHA-IP-MIP4
284 */
285 ip = fr_pair_find_by_da_nested(&request->reply_pairs, NULL, attr_wimax_hha_ip_mip4);
286 if (!ip) {
287 RWDEBUG("%s not found. Cannot calculate MN-HA-PMIP4 key", attr_wimax_hha_ip_mip4->name);
288 break;
289 }
290
291 /*
292 * MN-HA-PMIP4 =
293 * H(MIP-RK, "PMIP4 MN HA" | HA-IPv4 | MN-NAI);
294 */
295 EVP_MD_CTX_reset(hmac_ctx);
296 EVP_DigestSignInit(hmac_ctx, NULL, EVP_sha1(), NULL, hmac_pkey);
297
298 EVP_DigestSignUpdate(hmac_ctx, (uint8_t const *) "PMIP4 MN HA", 11);
299 EVP_DigestSignUpdate(hmac_ctx, (uint8_t const *) &ip->vp_ipv4addr, 4);
300 EVP_DigestSignUpdate(hmac_ctx, (uint8_t const *) &mn_nai->vp_strvalue, mn_nai->vp_length);
301 EVP_DigestSignFinal(hmac_ctx, &mip_rk_1[0], &rk1_len);
302
303 /*
304 * Put MN-HA-PMIP4 into WiMAX-MN-hHA-MIP4-Key
305 */
307 fr_pair_value_memdup(vp, &mip_rk_1[0], rk1_len, false);
308
309 /*
310 * Put MN-HA-PMIP4-SPI into WiMAX-MN-hHA-MIP4-SPI
311 */
313 vp->vp_uint32 = mip_spi + 1;
314 break;
315
316 case 3: /* CMIP4 */
317 /*
318 * Look for WiMAX-hHA-IP-MIP4
319 */
320 ip = fr_pair_find_by_da_nested(&request->reply_pairs, NULL, attr_wimax_hha_ip_mip4);
321 if (!ip) {
322 RWDEBUG("%s not found. Cannot calculate MN-HA-CMIP4 key", attr_wimax_hha_ip_mip4->name);
323 break;
324 }
325
326 /*
327 * MN-HA-CMIP4 =
328 * H(MIP-RK, "CMIP4 MN HA" | HA-IPv4 | MN-NAI);
329 */
330 EVP_MD_CTX_reset(hmac_ctx);
331 EVP_DigestSignInit(hmac_ctx, NULL, EVP_sha1(), NULL, hmac_pkey);
332
333 EVP_DigestSignUpdate(hmac_ctx, (uint8_t const *) "CMIP4 MN HA", 11);
334 EVP_DigestSignUpdate(hmac_ctx, (uint8_t const *) &ip->vp_ipv4addr, 4);
335 EVP_DigestSignUpdate(hmac_ctx, (uint8_t const *) &mn_nai->vp_strvalue, mn_nai->vp_length);
336 EVP_DigestSignFinal(hmac_ctx, &mip_rk_1[0], &rk1_len);
337
338 /*
339 * Put MN-HA-CMIP4 into WiMAX-MN-hHA-MIP4-Key
340 */
342 fr_pair_value_memdup(vp, &mip_rk_1[0], rk1_len, false);
343
344 /*
345 * Put MN-HA-CMIP4-SPI into WiMAX-MN-hHA-MIP4-SPI
346 */
348 vp->vp_uint32 = mip_spi;
349 break;
350
351 case 4: /* CMIP6 */
352 /*
353 * Look for WiMAX-hHA-IP-MIP6
354 */
355 ip = fr_pair_find_by_da_nested(&request->reply_pairs, NULL, attr_wimax_hha_ip_mip6);
356 if (!ip) {
357 RWDEBUG("%s not found. Cannot calculate MN-HA-CMIP6 key", attr_wimax_hha_ip_mip6->name);
358 break;
359 }
360
361 /*
362 * MN-HA-CMIP6 =
363 * H(MIP-RK, "CMIP6 MN HA" | HA-IPv6 | MN-NAI);
364 */
365 EVP_MD_CTX_reset(hmac_ctx);
366 EVP_DigestSignInit(hmac_ctx, NULL, EVP_sha1(), NULL, hmac_pkey);
367
368 EVP_DigestSignUpdate(hmac_ctx, (uint8_t const *) "CMIP6 MN HA", 11);
369 EVP_DigestSignUpdate(hmac_ctx, (uint8_t const *) &ip->vp_ipv6addr, 16);
370 EVP_DigestSignUpdate(hmac_ctx, (uint8_t const *) &mn_nai->vp_strvalue, mn_nai->vp_length);
371 EVP_DigestSignFinal(hmac_ctx, &mip_rk_1[0], &rk1_len);
372
373 /*
374 * Put MN-HA-CMIP6 into WiMAX-MN-hHA-MIP6-Key
375 */
377 fr_pair_value_memdup(vp, &mip_rk_1[0], rk1_len, false);
378
379 /*
380 * Put MN-HA-CMIP6-SPI into WiMAX-MN-hHA-MIP6-SPI
381 */
383 vp->vp_uint32 = mip_spi + 2;
384 break;
385
386 default:
387 break; /* do nothing */
388 }
389
390 /*
391 * Generate FA-RK, if requested.
392 *
393 * FA-RK= H(MIP-RK, "FA-RK")
394 */
395 fa_rk = fr_pair_find_by_da_nested(&request->reply_pairs, NULL, attr_wimax_fa_rk_key);
396 if (fa_rk && (fa_rk->vp_length <= 1)) {
397 EVP_MD_CTX_reset(hmac_ctx);
398 EVP_DigestSignInit(hmac_ctx, NULL, EVP_sha1(), NULL, hmac_pkey);
399
400 EVP_DigestSignUpdate(hmac_ctx, (uint8_t const *) "FA-RK", 5);
401
402 EVP_DigestSignFinal(hmac_ctx, &mip_rk_1[0], &rk1_len);
403
404 fr_pair_value_memdup(fa_rk, &mip_rk_1[0], rk1_len, false);
405 }
406
407 /*
408 * Create FA-RK-SPI, which is really SPI-CMIP4, which is
409 * really MIP-SPI. Clear? Of course. This is WiMAX.
410 */
411 if (fa_rk) {
413 vp->vp_uint32 = mip_spi;
414 }
415
416 /*
417 * Give additional information about requests && responses
418 *
419 * WiMAX-RRQ-MN-HA-SPI
420 */
421 vp = fr_pair_find_by_da_nested(&request->request_pairs, NULL, attr_wimax_rrq_mn_ha_spi);
422 if (vp) {
423 REDEBUG2("Client requested MN-HA key: Should use SPI to look up key from storage");
424 if (!mn_nai) {
425 RWDEBUG("MN-NAI was not found!");
426 }
427
428 /*
429 * WiMAX-RRQ-HA-IP
430 */
431 if (!fr_pair_find_by_da_nested(&request->request_pairs, NULL, attr_wimax_rrq_ha_ip)) {
432 RWDEBUG("HA-IP was not found!");
433 }
434
435 /*
436 * WiMAX-HA-RK-Key-Requested
437 */
438 vp = fr_pair_find_by_da_nested(&request->request_pairs, NULL, attr_wimax_ha_rk_key_requested);
439 if (vp && (vp->vp_uint32 == 1)) {
440 REDEBUG2("Client requested HA-RK: Should use IP to look it up from storage");
441 }
442 }
443
444 /*
445 * Wipe the context of all sensitive information.
446 */
447 EVP_MD_CTX_free(hmac_ctx);
448 EVP_PKEY_free(hmac_pkey);
449
451}
452
453/*
454 * The module name should be the only globally exported symbol.
455 * That is, everything else should be 'static'.
456 *
457 * If the module needs to temporarily modify it's instantiation
458 * data, the type should be changed to MODULE_TYPE_THREAD_UNSAFE.
459 * The server will then take care of ensuring that the module
460 * is single-threaded.
461 */
464 .common = {
465 .magic = MODULE_MAGIC_INIT,
466 .name = "wimax",
467 .inst_size = sizeof(rlm_wimax_t),
469 },
470 .method_group = {
471 .bindings = (module_method_binding_t[]){
472 { .section = SECTION_NAME("recv", "Accounting-Request"), .method = mod_preacct },
473 { .section = SECTION_NAME("recv", CF_IDENT_ANY), .method = mod_authorize },
474 { .section = SECTION_NAME("send", CF_IDENT_ANY), .method = mod_post_auth },
476 }
477 }
478};
unlang_action_t
Returned by unlang_op_t calls, determine the next action of the interpreter.
Definition action.h:35
static int const char char buffer[256]
Definition acutest.h:576
#define fr_base16_encode(_out, _in)
Definition base16.h:54
#define USES_APPLE_DEPRECATED_API
Definition build.h:493
#define RCSID(id)
Definition build.h:506
#define UNUSED
Definition build.h:336
#define CONF_PARSER_TERMINATOR
Definition cf_parse.h:657
#define FR_CONF_OFFSET(_name, _struct, _field)
conf_parser_t which parses a single CONF_PAIR, writing the result to a field in a struct
Definition cf_parse.h:280
Defines a CONF_PAIR to C data type mapping.
Definition cf_parse.h:594
#define CF_IDENT_ANY
Definition cf_util.h:75
#define FR_DBUFF_TMP(_start, _len_or_end)
Creates a compound literal to pass into functions which accept a dbuff.
Definition dbuff.h:522
#define MEM(x)
Definition debug.h:46
fr_dict_attr_t const ** out
Where to write a pointer to the resolved fr_dict_attr_t.
Definition dict.h:292
fr_dict_t const ** out
Where to write a pointer to the loaded/resolved fr_dict_t.
Definition dict.h:305
#define DICT_AUTOLOAD_TERMINATOR
Definition dict.h:311
Specifies an attribute which must be present for the module to function.
Definition dict.h:291
Specifies a dictionary which must be loaded/loadable for the module to function.
Definition dict.h:304
#define MODULE_MAGIC_INIT
Stop people using different module/library/server versions together.
Definition dl_module.h:63
#define RWDEBUG(fmt,...)
Definition log.h:373
#define REDEBUG2(fmt,...)
Definition log.h:384
@ FR_TYPE_IPV4_ADDR
32 Bit IPv4 Address.
@ FR_TYPE_STRING
String of printable characters.
@ FR_TYPE_UINT32
32 Bit unsigned integer.
@ FR_TYPE_VENDOR
Attribute that represents a vendor in the attribute tree.
@ FR_TYPE_IPV6_ADDR
128 Bit IPv6 Address.
@ FR_TYPE_COMBO_IP_ADDR
IPv4 or IPv6 address depending on length.
@ FR_TYPE_OCTETS
Raw octets.
unsigned int uint32_t
unsigned char uint8_t
module_instance_t const * mi
Instance of the module being instantiated.
Definition module_ctx.h:42
Temporary structure to hold arguments for module calls.
Definition module_ctx.h:41
module_t common
Common fields presented by all modules.
Definition module_rlm.h:39
static uint32_t fr_nbo_to_uint32(uint8_t const data[static sizeof(uint32_t)])
Read an unsigned 32bit integer from wire format (big endian)
Definition nbo.h:167
int fr_pair_value_memdup(fr_pair_t *vp, uint8_t const *src, size_t len, bool tainted)
Copy data into an "octets" data type.
Definition pair.c:2962
fr_pair_t * fr_pair_find_by_da_nested(fr_pair_list_t const *list, fr_pair_t const *prev, fr_dict_attr_t const *da)
Find a pair with a matching fr_dict_attr_t, by walking the nested fr_dict_attr_t tree.
Definition pair.c:784
fr_pair_t * fr_pair_find_by_da(fr_pair_list_t const *list, fr_pair_t const *prev, fr_dict_attr_t const *da)
Find the first pair with a matching da.
Definition pair.c:707
int fr_pair_value_bstr_realloc(fr_pair_t *vp, char **out, size_t size)
Change the length of a buffer for a "string" type value pair.
Definition pair.c:2784
static const conf_parser_t config[]
Definition base.c:163
#define DEBUG2(fmt,...)
#define RETURN_UNLANG_UPDATED
Definition rcode.h:70
#define RETURN_UNLANG_OK
Definition rcode.h:64
#define RETURN_UNLANG_NOOP
Definition rcode.h:69
fr_dict_autoload_t rlm_wimax_dict[]
Definition rlm_wimax.c:55
static fr_dict_attr_t const * attr_wimax_fa_rk_key
Definition rlm_wimax.c:75
static fr_dict_attr_t const * attr_wimax_fa_rk_spi
Definition rlm_wimax.c:76
static fr_dict_attr_t const * attr_wimax_rrq_ha_ip
Definition rlm_wimax.c:78
static fr_dict_attr_t const * attr_wimax_hha_ip_mip4
Definition rlm_wimax.c:71
static unlang_action_t mod_post_auth(unlang_result_t *p_result, module_ctx_t const *mctx, request_t *request)
Definition rlm_wimax.c:171
bool delete_mppe_keys
Definition rlm_wimax.c:43
static unlang_action_t mod_authorize(unlang_result_t *p_result, UNUSED module_ctx_t const *mctx, request_t *request)
Definition rlm_wimax.c:126
static fr_dict_attr_t const * attr_eap_msk
Definition rlm_wimax.c:62
static fr_dict_t const * dict_freeradius
Definition rlm_wimax.c:52
static fr_dict_attr_t const * attr_wimax_mn_hha_mip4_spi
Definition rlm_wimax.c:70
static fr_dict_attr_t const * attr_calling_station_id
Definition rlm_wimax.c:65
static fr_dict_attr_t const * attr_wimax_hha_ip_mip6
Definition rlm_wimax.c:72
static fr_dict_t const * dict_radius
Definition rlm_wimax.c:51
static fr_dict_attr_t const * attr_wimax_mn_hha_mip6_key
Definition rlm_wimax.c:73
static fr_dict_attr_t const * attr_wimax_mn_nai
Definition rlm_wimax.c:63
static fr_dict_attr_t const * attr_eap_emsk
Definition rlm_wimax.c:61
static fr_dict_attr_t const * attr_wimax_mn_hha_mip4_key
Definition rlm_wimax.c:69
static fr_dict_attr_t const * attr_ms_mppe_send_key
Definition rlm_wimax.c:81
static unlang_action_t mod_preacct(unlang_result_t *p_result, module_ctx_t const *mctx, request_t *request)
Definition rlm_wimax.c:163
fr_dict_attr_autoload_t rlm_wimax_dict_attr[]
Definition rlm_wimax.c:85
static fr_dict_attr_t const * attr_wimax_rrq_mn_ha_spi
Definition rlm_wimax.c:77
static fr_dict_attr_t const * attr_wimax_msk
Definition rlm_wimax.c:67
static fr_dict_attr_t const * attr_ms_mppe_recv_key
Definition rlm_wimax.c:82
module_rlm_t rlm_wimax
Definition rlm_wimax.c:463
static const conf_parser_t module_config[]
Definition rlm_wimax.c:46
static fr_dict_attr_t const * attr_wimax_ip_technology
Definition rlm_wimax.c:68
static fr_dict_attr_t const * attr_wimax_ha_rk_key_requested
Definition rlm_wimax.c:79
static fr_dict_attr_t const * attr_wimax_mn_hha_mip6_spi
Definition rlm_wimax.c:74
#define FR_SBUFF_OUT(_start, _len_or_end)
#define SECTION_NAME(_name1, _name2)
Define a section name consisting of a verb and a noun.
Definition section.h:39
size_t inst_size
Size of the module's instance data.
Definition module.h:212
void * data
Module's instance data.
Definition module.h:293
#define MODULE_BINDING_TERMINATOR
Terminate a module binding list.
Definition module.h:152
Named methods exported by a module.
Definition module.h:174
#define pair_update_reply(_attr, _da)
Return or allocate a fr_pair_t in the reply list.
Definition pair.h:129
#define pair_delete_reply(_pair_or_da)
Delete a fr_pair_t in the reply list.
Definition pair.h:181
eap_aka_sim_process_conf_t * inst
fr_pair_t * vp
Stores an attribute, a value and various bits of other data.
Definition pair.h:68
#define talloc_get_type_abort_const
Definition talloc.h:110
int nonnull(2, 5))
#define fr_box_octets(_val, _len)
Definition value.h:311