DHCP-Hostname + module/dhcp

Arran Cudbard-Bell a.cudbardb at freeradius.org
Wed Apr 15 17:23:32 CEST 2015


>   Thanks for answer! btw, I would like to know if have some way to do that
> using something like a foreach(). do have idea if is possible?

There's foreach, yes.

foreach &Alc-ToServer-Dhcp-Options {
	update request {
		Tmp-Octets-0 := "%{Foreach-Variable-0}"
	}
	if (&Tmp-Octets-0 && ("%{dhcp_options:&Tmp-Octets-0}" == 0)) {
		update reply {
			Reply-Message := 'Failed decoding DHCP options'
		}
		invalid
	}
}

Might need to add 0x in front of %{Foreach-Variable-0}.

-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: 872 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20150415/c1875025/attachment.sig>


More information about the Freeradius-Users mailing list