]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
dhcpclient - xlat is not supported 2271/head
authornchaigne <nchaigne@capgemini.fr>
Tue, 7 Aug 2018 14:35:25 +0000 (16:35 +0200)
committernchaigne <nchaigne@capgemini.fr>
Tue, 7 Aug 2018 14:36:53 +0000 (16:36 +0200)
Apply the same processing as performed in radclient to input value pairs

src/modules/proto_dhcpv4/dhcpclient.c

index 7af27ece74da154bc9bd0d5a91dd973da54cbc92..59c4689abd8cfbfa0077f1440783650126750fe8 100644 (file)
@@ -182,6 +182,16 @@ static RADIUS_PACKET *request_init(char const *filename)
        for (vp = fr_cursor_init(&cursor, &request->vps);
             vp;
             vp = fr_cursor_next(&cursor)) {
+
+               /*
+                *      Xlat expansions are not supported. Provide a string value instead.
+                */
+               if (vp->type == VT_XLAT) {
+                       vp->type = VT_DATA;
+                       vp->vp_strvalue = vp->xlat;
+                       vp->vp_length = talloc_array_length(vp->vp_strvalue) - 1;
+               }
+
                /*
                 *      Allow to set packet type using DHCP-Message-Type
                 */