Error binding port to ipv6 address

D'AVELLA STEFANO Stefano.DAvella at alcatel-lucent.com
Tue Feb 10 16:21:38 CET 2009


Ok I have traced where the problem is (of course it was in the actual
binding of the port).
Listen_init() calls listen_parse() that calls common_socket_parse().
 
Inside this function around line 510 of listen.c there is this line:
 
/*
  * And bind it to the port.
  */
 if (listen_bind(this) < 0) {
 
the call to listen_bind() actually returns -1 and that's the problem.
Because I am new at ipv6 too I will get sometime to examine what
listen_bind() exactly do (and why it returns -1), anyway meanwhile I
printed the variable "this" passed to it and the variable "this->data"
that inside the function is assigned to sock. Here are the results:
 
print *this
$30 = {next = 0x0, type = RAD_LISTEN_AUTH, fd = -1, server = 0x0, status
= 0,
  recv = 0x8059ba0 <auth_socket_recv>, send = 0x8057640
<auth_socket_send>,
  encode = 0x8057960 <client_socket_encode>,
  decode = 0x8057880 <client_socket_decode>, print = 0x8057b40
<socket_print>,
  data = 0x8cd40a0, stats = {total_requests = 0, total_invalid_requests
= 0,
    total_dup_requests = 0, total_responses = 0, total_access_accepts =
0,
    total_access_rejects = 0, total_access_challenges = 0,
    total_malformed_requests = 0, total_bad_authenticators = 0,
    total_packets_dropped = 0, total_no_records = 0, total_unknown_types
= 0}
 

 print *(listen_socket_t *) this->data
$33 = {ipaddr = {af = 10, ipaddr = {ip4addr = {s_addr = 288}, ip6addr =
{
        __in6_u = {__u6_addr8 = " \001", '\0' <repeats 12 times>,
"\003P",
          __u6_addr16 = {288, 0, 0, 0, 0, 0, 0, 20483}, __u6_addr32 =
{288, 0,
            0, 1342373888}}}}}, port = 0, interface = 0x8bdea7e "eth3",
  clients = 0x0}

(I couldn't print directly sock because gdb didn't allow me to access
that memory address).
 
If somebody sees something wrong please tells me (I have still to check
how the two structs are organized so for the moment I still don't know)
 
 
 -
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20090210/49d2fdca/attachment.html>


More information about the Freeradius-Users mailing list