IPv6 coa isn't working having IPv6 NAS IP

Arran Cudbard-Bell a.cudbardb at freeradius.org
Mon Jul 20 20:26:53 CEST 2015


> On Jul 20, 2015, at 2:02 PM, Samir Patel <samir198 at gmail.com> wrote:
> 
> Hi Alan,
> 
> The solution you provided has worked like a charm.
> 
> I really appreciate your help.
> 
> Thank you very much for all the prompt help as well.

Weird, that should work automatically.  Radclient hadn't been modified to use the fr_pton* series of functions, and was using some old logic.

Moving it to using fr_pton_port (slightly modified to support -4 -6), things seem to work ok:

crashant:freeradius-server-fork arr2036$ echo "User-Name == foo" |  /usr/local/freeradius/bin/radclient [::1]:1813 auth testing123
Sent Access-Request Id 88 from [::]:64852 to [::1]:1813 length 25

crashant:freeradius-server-fork arr2036$ echo "User-Name == foo" |  /usr/local/freeradius/bin/radclient [::1]:1812 auth testing123
Sent Access-Request Id 223 from [::]:63771 to [::1]:1812 length 25

crashant:freeradius-server-fork arr2036$ echo "User-Name == foo" |  /usr/local/freeradius/bin/radclient [::1] auth testing123
Sent Access-Request Id 99 from [::]:61089 to [::1]:1812 length 25

crashant:freeradius-server-fork arr2036$ echo "User-Name == foo" |  /usr/local/freeradius/bin/radclient ::1 auth testing123
Sent Access-Request Id 183 from [::]:62479 to [::1]:1812 length 25

crashant:freeradius-server-fork arr2036$ echo "User-Name == foo" |  /usr/local/freeradius/bin/radclient 127.0.0.1:1813 auth testing123
Sent Access-Request Id 176 from 0.0.0.0:58690 to 127.0.0.1:1813 length 25

crashant:freeradius-server-fork arr2036$ echo "User-Name == foo" |  /usr/local/freeradius/bin/radclient 127.0.0.1 auth testing123
Sent Access-Request Id 92 from 0.0.0.0:60291 to 127.0.0.1:1812 length 25

crashant:freeradius-server-fork arr2036$ echo "User-Name == foo" |  /usr/local/freeradius/bin/radclient 127.0.0.1:1812 auth testing123
Sent Access-Request Id 35 from 0.0.0.0:61014 to 127.0.0.1:1812 length 25

crashant:freeradius-server-fork arr2036$ echo "User-Name == foo" |  /usr/local/freeradius/bin/radclient google.com:1813 auth testing123
Sent Access-Request Id 188 from 0.0.0.0:64130 to 74.125.226.101:1813 length 25

crashant:freeradius-server-fork arr2036$ echo "User-Name == foo" |  /usr/local/freeradius/bin/radclient -6 google.com:1813 auth testing123
Sent Access-Request Id 71 from [::]:49345 to [2607:f8b0:400b:80a::1002]:1813 length 25

echo "User-Name == foo" |  /usr/local/freeradius/bin/radclient -4 google.com:1813 auth testing123
Sent Access-Request Id 121 from 0.0.0.0:58580 to 74.125.226.98:1813 length 25

crashant:freeradius-server-fork arr2036$ echo "User-Name == foo" |  /usr/local/freeradius/bin/radclient -4 [google.com]:1813 auth testing123
radclient: Failed to parse IPv6 address string "google.com"

echo "User-Name == foo" |  /usr/local/freeradius/bin/radclient -4 ::1:1813 auth testing123
(0) Failed to send packet for ID 51: sendto failed: No route to host

 echo "User-Name == foo" |  /usr/local/freeradius/bin/radclient [::1]: auth testing123
radclient: Port 0 outside valid port range 1-65535

(I guess that could use a better message)

I also fixed the address printing code to surround v6 addresses in brackets :)

-Arran
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20150720/f7c6a8a4/attachment-0001.sig>


More information about the Freeradius-Users mailing list