[asterisk-bugs] [JIRA] (ASTERISK-18828) CEL RADIUS garbage in attribute values
Joshua Colp (JIRA)
noreply at issues.asterisk.org
Wed Jan 6 12:05:33 CST 2016
[ https://issues.asterisk.org/jira/browse/ASTERISK-18828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joshua Colp closed ASTERISK-18828.
----------------------------------
Resolution: Fixed
> CEL RADIUS garbage in attribute values
> --------------------------------------
>
> Key: ASTERISK-18828
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-18828
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: CEL/General
> Affects Versions: 1.8.8.0, 1.8.15.0
> Environment: Fedora 15 32 bit, radiusclient-ng-0.5.6-6.fc15.i686
> Reporter: Saeed Mohammadi
> Attachments: cel_radius.c.patch
>
>
> The vendor specific attributes received by the radius server were showing garbage in value.
> First guess was that secret is not set correctly on both sides. Checked, not the cause of issue.
> Tracing the packet showed that among all VSA, some contain correct values such as EVENTTIME. Checking the code of cel_radius.c showed different method of calling rc_avpair_add. Those which has correct values were adding by direct call to this function but garbage data pairs were called using ADD_VENDORE_CODE.
> {code}
> #define ADD_VENDOR_CODE(x,y) (rc_avpair_add(rh, send, x, &y, strlen(y), VENDOR_CODE))
> {code}
> Parameter y is sending by its address while is a const char * when it is called
> {code}
> ADD_VENDOR_CODE(PW_AST_CIDNAME, record->caller_id_name) ---> caller_id_name is const char *
> {code}
> So the function rc_avpair_add gets a pointer to pointer instead of a void *
> the following line will fix this issues
> {code}
> #define ADD_VENDOR_CODE(x,y) (rc_avpair_add(rh, send, x, &y, strlen(y), VENDOR_CODE))
> -->
> #define ADD_VENDOR_CODE(x,y) (rc_avpair_add(rh, send, x, y, strlen(y), VENDOR_CODE))
> {code}
> Besides that on the same issue is seen on the line which is calling rc_avpair_add for PW_USER_NAME
> {code}
> &record->channel_name ---> record->channel_name
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list