Hi, I have compared reply attributes between version 2.2.6 & 3.0.8 ( for the same request), i found little difference for Cisco-AVPair attribute (escaping \\n vs \n). Is it correct ? Debug log (version 3.0.8): ... (0) perl: &reply:Cisco-AVPair += $RAD_REPLY{'Cisco-AVPair'} -> 'lcp:interface-config=ip vrf forwarding TOPVAR \nip unnumbered Loopback1' (0) perl: &reply:Cisco-AVPair += $RAD_REPLY{'Cisco-AVPair'} -> 'ip:dns-servers=10.248.136.20 10.18.86.16' ... (0) [perl] = ok (0) } # post-auth = ok (0) Login OK: [421908290143@TOPVAR/<CHAP-Password>] (from client localhost port 2197 cli 421908290143) (0) Sent Access-Accept Id 173 from 127.0.0.1:1812 to 127.0.0.1:36008 length 0 (0) Framed-IP-Netmask = 255.255.255.255 (0) Framed-IP-Address = 172.30.72.54 (0) Cisco-AVPair += 'lcp:interface-config=ip vrf forwarding TOPVAR \\nip unnumbered Loopback1' (0) Cisco-AVPair += 'ip:dns-servers=10.248.136.20 10.18.86.16' (0) Service-Type = Framed-User (0) Framed-Protocol = PPP (0) Finished request Debug log (version 2.2.6): +group post-auth { ... rlm_perl: Added pair Cisco-AVPair = lcp:interface-config=ip vrf forwarding TOPVAR \nip unnumbered Loopback1 rlm_perl: Added pair Cisco-AVPair = ip:dns-servers=10.248.136.20 10.18.86.16 ++[perl] = ok +} # group post-auth = ok Sending Access-Accept of id 3 to 127.0.0.1 port 40061 Cisco-AVPair += "lcp:interface-config=ip vrf forwarding TOPVAR \nip unnumbered Loopback1" Cisco-AVPair += "ip:dns-servers=10.248.136.20 10.18.86.16" Framed-Protocol = PPP Service-Type = Framed-User Framed-IP-Address = 172.30.72.54 Framed-IP-Netmask = 255.255.255.255 Finished request 0. Thank you very much
On Apr 23, 2015, at 9:22 AM, Peter Balsianok <balsianok.peter@gmail.com> wrote:
I have compared reply attributes between version 2.2.6 & 3.0.8 ( for the same request), i found little difference for Cisco-AVPair attribute (escaping \\n vs \n).
The server has been fixed to use correct escaping. If you want a Perl string with a literal "\" followed by a literal "n", then use "\n" in a string. If you want a Perl string with an embedded carriage return, then the string must contain an embedded carriage return. Alan DeKok.
I have checked Access-Accept packet via wireshark (There is everything ok). I didn`t realize that this is behaviour of the radclient (how string are printed to STDOUT) Thx. On Thu, Apr 23, 2015 at 3:32 PM, Alan DeKok <aland@deployingradius.com> wrote:
On Apr 23, 2015, at 9:22 AM, Peter Balsianok <balsianok.peter@gmail.com> wrote:
I have compared reply attributes between version 2.2.6 & 3.0.8 ( for the same request), i found little difference for Cisco-AVPair attribute (escaping \\n vs \n).
The server has been fixed to use correct escaping.
If you want a Perl string with a literal "\" followed by a literal "n", then use "\n" in a string. If you want a Perl string with an embedded carriage return, then the string must contain an embedded carriage return.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
participants (2)
-
Alan DeKok -
Peter Balsianok