| Anonymous | Login | Signup for a new account | 11-10-2008 10:51 PST |
| Main | My View | View Issues | Change Log | Docs |
| Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | |||||||||||
| ID | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
| 0000504 | [uClibc] Networking Support | block | always | 10-24-05 11:45 | 10-25-05 10:36 | |||||||
| Reporter | Johan | View Status | public | |||||||||
| Assigned To | uClibc | |||||||||||
| Priority | normal | Resolution | open | |||||||||
| Status | assigned | Product Version | 0.9.28 | |||||||||
| Summary | 0000504: 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 ) ); |
|||||||||||
| Additional Information | ||||||||||||
| Attached Files | ||||||||||||
|
|
||||||||||||
Notes |
|
|
(0000642) 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. |
| Copyright © 2000 - 2006 Mantis Group |