summaryrefslogtreecommitdiffstats
path: root/contrib/wpa/src/radius/radius.c
diff options
context:
space:
mode:
authorrpaulo <rpaulo@FreeBSD.org>2015-10-18 21:38:25 +0000
committerrpaulo <rpaulo@FreeBSD.org>2015-10-18 21:38:25 +0000
commitc437e26a1d8c13d53c6b57c8f8a8a28525fb34b0 (patch)
tree2a6d777bac31b66dc039b0c8eed342049d131f0b /contrib/wpa/src/radius/radius.c
parent7b5d098c90f0f2e5151f5a80014ba3932988a132 (diff)
parent7726170474c6c89d386ba77b425d186e993a03a0 (diff)
downloadFreeBSD-src-c437e26a1d8c13d53c6b57c8f8a8a28525fb34b0.zip
FreeBSD-src-c437e26a1d8c13d53c6b57c8f8a8a28525fb34b0.tar.gz
Update hostapd/wpa_supplicant to version 2.5.
Tested by several people on current@/wireless@. Relnotes: yes
Diffstat (limited to 'contrib/wpa/src/radius/radius.c')
-rw-r--r--contrib/wpa/src/radius/radius.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/contrib/wpa/src/radius/radius.c b/contrib/wpa/src/radius/radius.c
index 8d878a4..1ebfd11 100644
--- a/contrib/wpa/src/radius/radius.c
+++ b/contrib/wpa/src/radius/radius.c
@@ -167,7 +167,7 @@ struct radius_attr_type {
} data_type;
};
-static struct radius_attr_type radius_attrs[] =
+static const struct radius_attr_type radius_attrs[] =
{
{ RADIUS_ATTR_USER_NAME, "User-Name", RADIUS_ATTR_TEXT },
{ RADIUS_ATTR_USER_PASSWORD, "User-Password", RADIUS_ATTR_UNDIST },
@@ -259,7 +259,7 @@ static struct radius_attr_type radius_attrs[] =
#define RADIUS_ATTRS ARRAY_SIZE(radius_attrs)
-static struct radius_attr_type *radius_get_attr_type(u8 type)
+static const struct radius_attr_type *radius_get_attr_type(u8 type)
{
size_t i;
@@ -274,7 +274,7 @@ static struct radius_attr_type *radius_get_attr_type(u8 type)
static void radius_msg_dump_attr(struct radius_attr_hdr *hdr)
{
- struct radius_attr_type *attr;
+ const struct radius_attr_type *attr;
int len;
unsigned char *pos;
char buf[1000];
@@ -1225,7 +1225,7 @@ int radius_msg_add_mppe_keys(struct radius_msg *msg,
}
/* MS-MPPE-Recv-Key */
- buf = os_malloc(hlen + send_key_len + 16);
+ buf = os_malloc(hlen + recv_key_len + 16);
if (buf == NULL) {
return 0;
}
@@ -1425,7 +1425,7 @@ struct radius_tunnel_attrs {
/**
* radius_msg_get_vlanid - Parse RADIUS attributes for VLAN tunnel information
* @msg: RADIUS message
- * Returns: VLAN ID for the first tunnel configuration of -1 if none is found
+ * Returns: VLAN ID for the first tunnel configuration or 0 if none is found
*/
int radius_msg_get_vlanid(struct radius_msg *msg)
{
@@ -1488,7 +1488,7 @@ int radius_msg_get_vlanid(struct radius_msg *msg)
return tun->vlanid;
}
- return -1;
+ return 0;
}
OpenPOWER on IntegriCloud