hex:attribute-name behavior is changed

Chinnapaiyan, Nagamani Nagamani.Chinnapaiyan at viasat.com
Thu May 9 09:44:18 CEST 2019


Hi,

Previously the expansion %{hex:DHCP-Client-Hardware-Address} worked correctly by expanding to the mac address value inside the attribute.
Now the latest master(#a88b05513956b21ec037383780f9b568eeb49124) is expanding the raw string "DHCP-Client-Hardware-Address" to hex.

However, %{hex:%{DHCP-Client-Hardware-Address} is working as expected(expands the value inside the attribute).

Is this behavior is an intended change or a mistake?

debug out:
(1)    if ("0x%{hex:DHCP-Client-Hardware-Address}" == "%{DHCP-Relay-Remote-Id}") {
(1)      EXPAND 0x%{hex:DHCP-Client-Hardware-Address}
(1)      EXPAND %{hex:DHCP-Client-Hardware-Address}
(1)        --> 444843502d436c69656e742d48617264776172652d41646472657373
(1)         --> 0x444843502d436c69656e742d48617264776172652d41646472657373
(1)      EXPAND %{DHCP-Relay-Remote-Id}
(1)         --> 0x00a0bc00000a

(0)    if ("0x%{hex:%{DHCP-Client-Hardware-Address}}" == "%{DHCP-Relay-Remote-Id}") {
(0)      EXPAND 0x%{hex:%{DHCP-Client-Hardware-Address}}
(0)      EXPAND %{DHCP-Client-Hardware-Address}
(0)        --> 00:a0:bc:00:00:0a
(0)      EXPAND %{hex:%{DHCP-Client-Hardware-Address}}
(0)            (%{hex:00:a0:bc:00:00:0a})
(0)        --> 00a0bc00000a
(0)         --> 0x00a0bc00000a

Regards,
Nagamani Chinnapaiyan



More information about the Freeradius-Users mailing list