Hello, I have to process a vendor specific attribute from cisco, i.e. the Cisco-SSG-Account-Info attribute. ---snip--- #define PW_SSG_ACCOUNT_INFO 250 #define CISCO2ATTR(x) ((9 << 16) | (x)) ... vp = pairfind(request->packet->vps, CISCO2ATTR(PW_SSG_ACCOUNT_INFO)); if (!vp) { radlog(L_INFO, "Value pair not found!"); } else{ radlog(L_INFO, "%s, %i", vp->vp_strvalue, strlen(vp->vp_strvalue)); } ... ---snip--- If I send an authentication request the attribute is found. The problem is that the vp->vp_strvalue is cut after 128 chars and strlen(vp->vp_strvalue)) is 127. Though the length of vp_strvalue is defined in libradius.h by MAX_STRING_LEN (0-253 octets) according to RFC. I have sent the request by the NTRadPing test utility. Is it a known issue? Thank you for help. - Hagen
On 16 Jul 2014, at 09:07, Hagen Muench <hagen@webtronaut.de> wrote:
Hello,
I have to process a vendor specific attribute from cisco, i.e. the Cisco-SSG-Account-Info attribute.
---snip--- #define PW_SSG_ACCOUNT_INFO 250 #define CISCO2ATTR(x) ((9 << 16) | (x)) ... vp = pairfind(request->packet->vps, CISCO2ATTR(PW_SSG_ACCOUNT_INFO)); if (!vp) { radlog(L_INFO, "Value pair not found!"); } else{ radlog(L_INFO, "%s, %i", vp->vp_strvalue, strlen(vp->vp_strvalue)); } ... ---snip--- If I send an authentication request the attribute is found. The problem is that the vp->vp_strvalue is cut after 128 chars and strlen(vp->vp_strvalue)) is 127. Though the length of vp_strvalue is defined in libradius.h by MAX_STRING_LEN (0-253 octets) according to RFC.
I have sent the request by the NTRadPing test utility.
Is it a known issue? Thank you for help.
If it's a string type, the majority of VALUE_PAIR code in v2.x.x is not \0 safe, so processing will stop at the first null byte. V3.0.x is better, but not perfect. Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS development team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
After testing with the radclient tooI l could figure out that it's rather a limitation of the ntradping utility. Sorry for any inconvenience. Hagen
On 16 Jul 2014, at 09:07, Hagen Muench <hagen@webtronaut.de> wrote:
Hello,
I have to process a vendor specific attribute from cisco, i.e. the Cisco-SSG-Account-Info attribute.
---snip--- #define PW_SSG_ACCOUNT_INFO 250 #define CISCO2ATTR(x) ((9 << 16) | (x)) ... vp = pairfind(request->packet->vps, CISCO2ATTR(PW_SSG_ACCOUNT_INFO)); if (!vp) { radlog(L_INFO, "Value pair not found!"); } else{ radlog(L_INFO, "%s, %i", vp->vp_strvalue, strlen(vp->vp_strvalue)); } ... ---snip--- If I send an authentication request the attribute is found. The problem is that the vp->vp_strvalue is cut after 128 chars and strlen(vp->vp_strvalue)) is 127. Though the length of vp_strvalue is defined in libradius.h by MAX_STRING_LEN (0-253 octets) according to RFC.
I have sent the request by the NTRadPing test utility.
Is it a known issue? Thank you for help.
If it's a string type, the majority of VALUE_PAIR code in v2.x.x is not \0 safe, so processing will stop at the first null byte.
V3.0.x is better, but not perfect.
Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS development team
FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
Hello, we added a SQL driver module rlm_sql_relay for use of the SQLRelay of Dave Muse (http://sqlrelay.sourceforge.net/) instead of accessing a data base directly. The driver module is derived from your oracle driver using the C client API of the SQLRelay. Are you interested in it? Unfortunately we have to use the SQLRelay client libs in order to compile the module. Don't know whether this is a killer criterion... Take care, Hagen
On Jul 24, 2014, at 11:48 AM, Hagen Muench <hagen@webtronaut.de> wrote:
Hello,
we added a SQL driver module rlm_sql_relay for use of the SQLRelay of Dave Muse (http://sqlrelay.sourceforge.net/) instead of accessing a data base directly. The driver module is derived from your oracle driver using the C client API of the SQLRelay. Are you interested in it?
Sure
Unfortunately we have to use the SQLRelay client libs in order to compile the module. Don't know whether this is a killer criterion…
No, that’s fine, lots of sql drivers require external libraries to work, just make sure there’s a suitable configuration script. Send over a pull request and we’ll take a look at the code. -Arran
participants (2)
-
Arran Cudbard-Bell -
Hagen Muench