[uClibc 0000504]: IPv6 UDP socket problem
bugs at busybox.net
bugs at busybox.net
Tue Oct 25 17:36:15 UTC 2005
A NOTE has been added to this issue.
======================================================================
http://busybox.net/bugs/view.php?id=504
======================================================================
Reported By: Johan
Assigned To: uClibc
======================================================================
Project: uClibc
Issue ID: 504
Category: Networking Support
Reproducibility: always
Severity: block
Priority: normal
Status: assigned
======================================================================
Date Submitted: 10-24-2005 11:45 PDT
Last Modified: 10-25-2005 10:36 PDT
======================================================================
Summary: IPv6 UDP socket problem
Description:
Below is a piece of code to open a socket and bind it to a local link
address on ppp0. It works when compiled with glibc, but not when compiled
with uclibc. What happens is that nothing shows up on socket although
packets are coming in on that interface/port.
gcc is 4.0, uclibc is latest official. I have tried both linux2.4 and
linux2.6(latest official).
/*cfg->ip is a local link address set in pppd call.*/
/*returnvalue checks removed for better readablility, they were all OK
though.*/
/
bzero (&cfg->name6, sizeof (cfg->name6));
cfg->name6.sin6_family = AF_INET6;
cfg->name6.sin6_port = htonl(CMD_CHANNEL_PORT);
inet_pton(AF_INET6, cfg->ip, &(cfg->name6.sin6_addr));
cfg->name6.sin6_scope_id = if_nametoindex("ppp0");
cfg->Socket = socket( AF_INET6, SOCK_DGRAM, 0 ); //Create Socket, this
does not work
//cfg->Socket = socket( AF_INET6, SOCK_STREAM, 0 ); //Create Socket, this
works, for some reason
if( cfg->Socket < 0 ){
perror( "Unable to create socket.\n" );
return -1;
}
Bound=bind( cfg->Socket, (struct sockaddr*)&cfg->name6, sizeof( cfg->name6
) );
======================================================================
----------------------------------------------------------------------
Johan - 10-25-05 10:36
----------------------------------------------------------------------
Perhaps I should emphasize again that the address is a link local address,
which thus need the cfg->name6.sin6_scope_id field.
Issue History
Date Modified Username Field Change
======================================================================
10-24-05 11:45 Johan New Issue
10-24-05 11:45 Johan Status new => assigned
10-24-05 11:45 Johan Assigned To => uClibc
10-25-05 10:36 Johan Note Added: 0000642
======================================================================
More information about the uClibc-cvs
mailing list