Filter attributes at rest module

Alan DeKok aland at deployingradius.com
Wed Oct 25 12:40:47 CEST 2017


On Oct 25, 2017, at 1:40 AM, Herwin Weststrate <herwin at quarantainenet.nl> wrote:
> I guess it wouldn't be too hard to use the logic of
> https://github.com/FreeRADIUS/freeradius-server/blob/e4629d6922ac6b0ce0e5239d66b193c4e2f8dad9/src/modules/rlm_detail/rlm_detail.c#L133-L186
> to make a filter.

  Sure, that makes sense.

  In v4, that kind of patch is no longer necessary.  You can (today!) create a sub-request, and then control which attributes are copied to it.

  e.g.

	subrequest {
		update request {
			... copy the attributes you need ...
		}
		rest
		update {
			&parent.reply: += &reply:
		}
	}

  A little more complex in Unlang, but much clearer IMHO.

  Alan DeKok.




More information about the Freeradius-Users mailing list