IPv6 UDP bug in uclibc?

Johan . tracetrouble at yahoo.se
Mon Oct 24 18:40:52 UTC 2005


Below is another 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).

Has anyone of you been able to bind IPv6 UDP with
uclibc? If so, what differs in configuration from
mine?

Any hints for debugging?


/*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 ) );









More information about the uClibc mailing list