3.0.2 / rlm_rest - segmentation fault when "Opening additional connection"

Arran Cudbard-Bell a.cudbardb at freeradius.org
Fri Mar 28 12:07:58 CET 2014


On 28 Mar 2014, at 10:24, Chaigneau, Nicolas <nicolas.chaigneau at capgemini.com> wrote:

> Hello,
> 
> 
> I'm trying to use rlm_rest module, with no luck so far. I have a segmentation fault when it needs to add a connection to the pool.
> Any idea what the issue could be ?

Yeah, you've commented out connect_uri! Bad user, bad!

I'll push a fix.

You can just change:

	if (!*inst->connect_uri) {
		ERROR("rlm_rest (%s): Skipping pre-connect, connect_uri not specified", inst->xlat_name);
		return candle;
	}

in rest.c:
	if (!inst->connect_uri) {
		ERROR("rlm_rest (%s): Skipping pre-connect, connect_uri not specified", inst->xlat_name);
		return candle;
	}

Or as a work around, just set the connect URI to any URL on the server you're using,
that's the recommended configuration anyway, as it means there's no add latency 
establishing the TCP connection the first time a handle is used to service a request.

Thanks for the bug report.

Note: Before 3.0.3 (unreleased) rlm_rest is marked as an unstable module.

It was the large bit chunk of C code I wrote, and although the code organisation and general style
is ok, corner cases aren't always dealt with gracefully. 

When it was written, it involved changes to the FreeRADIUS core API to support new features, 
and unfortunately that API changed considerably between the time the module was written 
and FreeRADIUS 3.0.0 being released. That's part of the reason why there have been quite a few
issues with it.

-Arran

Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS Development Team

FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 881 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/mailman/private/freeradius-users/attachments/20140328/ccbbd500/attachment.pgp>


More information about the Freeradius-Users mailing list