annotate extensions/app_radgw/rgw_msg.c @ 516:1c2f5ee38039

Allow RADIUS Proxies with the app_radgw extension
author Sebastien Decugis <sdecugis@nict.go.jp>
date Fri, 27 Aug 2010 10:59:51 +0900
parents e203fc0c95e3
children d5383f28b96e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
254
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1 /*********************************************************************************************************
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2 * Software License Agreement (BSD License) *
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3 * Author: Sebastien Decugis <sdecugis@nict.go.jp> *
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
4 * *
258
5df55136361b Updated copyright information
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 255
diff changeset
5 * Copyright (c) 2010, WIDE Project and NICT *
254
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
6 * All rights reserved. *
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
7 * *
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
8 * Redistribution and use of this software in source and binary forms, with or without modification, are *
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
9 * permitted provided that the following conditions are met: *
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
10 * *
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
11 * * Redistributions of source code must retain the above *
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
12 * copyright notice, this list of conditions and the *
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
13 * following disclaimer. *
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
14 * *
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
15 * * Redistributions in binary form must reproduce the above *
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
16 * copyright notice, this list of conditions and the *
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
17 * following disclaimer in the documentation and/or other *
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
18 * materials provided with the distribution. *
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
19 * *
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
20 * * Neither the name of the WIDE Project or NICT nor the *
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
21 * names of its contributors may be used to endorse or *
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
22 * promote products derived from this software without *
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
23 * specific prior written permission of WIDE Project and *
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
24 * NICT. *
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
25 * *
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
26 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED *
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
27 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
28 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR *
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
29 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT *
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
30 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS *
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR *
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
32 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF *
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
33 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
34 *********************************************************************************************************/
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
35
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
36 /* This file contains all support functions to parse, create, and manipulate RADIUS messages. Other
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
37 modules do not need to "know" the actual representation of RADIUS messages on the network. They only
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
38 receive the logical view as exposed in the rgw.h file. This file extends the content of the radius.c
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
39 file functions (from hostap project).*/
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
40
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
41 #include "rgw.h"
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
42
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
43 /* Destroy a message */
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
44 void rgw_msg_free(struct rgw_radius_msg_meta ** msg)
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
45 {
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
46 if (!msg || !*msg)
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
47 return;
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
48
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
49 radius_msg_free(&(*msg)->radius);
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
50 free(*msg);
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
51 *msg = NULL;
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
52 }
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
53
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
54 /* This function creates a rgw_radius_msg_meta structure after parsing a RADIUS buffer */
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
55 int rgw_msg_parse(unsigned char * buf, size_t len, struct rgw_radius_msg_meta ** msg)
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
56 {
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
57 struct radius_msg * temp_msg = NULL;
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
58
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
59 TRACE_ENTRY("%p %g %p", buf, len, msg);
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
60
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
61 CHECK_PARAMS( buf && len && msg );
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
62
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
63 *msg = NULL;
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
64
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
65 /* Parse the RADIUS message */
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
66 temp_msg = radius_msg_parse(buf, len);
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
67 if (temp_msg == NULL) {
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
68 TRACE_DEBUG(INFO, "Error parsing the RADIUS message, discarding");
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
69 return EINVAL;
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
70 }
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
71
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
72 /* Now alloc space for the meta-data */
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
73 CHECK_MALLOC( *msg = realloc(temp_msg, sizeof(struct rgw_radius_msg_meta)) );
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
74
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
75 /* Clear memory after the parsed data */
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
76 memset( &(*msg)->radius + 1, 0, sizeof(struct rgw_radius_msg_meta) - sizeof(struct radius_msg) );
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
77
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
78 return 0;
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
79 }
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
80
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
81 /* Dump a message (inspired from radius_msg_dump) -- can be used safely with a struct radius_msg as parameter (we don't dump the metadata) */
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
82 void rgw_msg_dump(struct rgw_radius_msg_meta * msg)
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
83 {
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
84 unsigned char *auth;
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
85 size_t i;
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
86 if (! TRACE_BOOL(FULL) )
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
87 return;
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
88
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
89 auth = &(msg->radius.hdr->authenticator[0]);
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
90
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
91 fd_log_debug("------ RADIUS msg dump -------\n");
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
92 fd_log_debug(" id : 0x%02hhx, code : %hhd (%s)\n", msg->radius.hdr->identifier, msg->radius.hdr->code, rgw_msg_code_str(msg->radius.hdr->code));
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
93 fd_log_debug(" auth: %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx\n",
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
94 auth[0], auth[1], auth[2], auth[3],
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
95 auth[4], auth[5], auth[6], auth[7]);
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
96 fd_log_debug(" %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx\n",
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
97 auth[8], auth[9], auth[10], auth[11],
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
98 auth[12], auth[13], auth[14], auth[15]);
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
99 for (i = 0; i < msg->radius.attr_used; i++) {
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
100 struct radius_attr_hdr *attr = (struct radius_attr_hdr *)(msg->radius.buf + msg->radius.attr_pos[i]);
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
101 fd_log_debug(" - len:%3hhu, type:0x%02hhx (%s)\n", attr->length, attr->type, rgw_msg_attrtype_str(attr->type));
516
1c2f5ee38039 Allow RADIUS Proxies with the app_radgw extension
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 356
diff changeset
102 radius_msg_dump_attr_val(attr);
254
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
103 }
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
104 fd_log_debug("-----------------------------\n");
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
105 }
a857024cb48b Ported the RADIUS/Diameter translation code from waaad project. Not tested yet. Gateway plugins to come later.
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
106
"Welcome to our mercurial repository"