getaddrinfo Segmentation fault while pppoe interface up
八戒哥哥
l0op8ack at hotmail.com
Mon Apr 20 21:43:03 UTC 2009
hi,all
I'm a buildroot user who struggle to make an old celeron pc with 2 ethernet NICs as access router.
The leased line is ADSL(PPPoE).
I statically linked busybox against uclibc 0.9.30.1 ,using buildroot.
Bringing up ppp0 interface by rp-pppoe pppoe-connect script,so far so good.
Executing 'ping' ip address, the 'ping' command reports 'Segmentation fault'.
In fact, any network related command , such as wget/ftpget, report 'Segmentation fault'.
Shutdown the ppp0 interface by killing the 'pppd' and 'pppoe' processes,
ping some local ip address, no 'Segmentation fault' reportes this time,
and wget/ftpget work.
Bringing up ppp interface will crash the network related command.
I follow the busybox-1.13.4/networking/ping.c,
and find that the reason is 'getaddrinfo' call faults
in fucntion 'static len_and_sockaddr* str2sockaddr',
at line 191,busybox-1.13.4/libbb/xconnect.c
135 static len_and_sockaddr* str2sockaddr(
136 const char *host, int port,
137 USE_FEATURE_IPV6(sa_family_t af,)
138 int ai_flags)
139 {
140 int rc;
141 len_and_sockaddr *r = NULL;
142 struct addrinfo *result = NULL;
143 struct addrinfo *used_res;
144 const char *org_host = host; /* only for error msg */
145 const char *cp;
146 struct addrinfo hint;
...
191 rc = getaddrinfo(host, NULL, &hint, &result);
...
I build busybox against glibc ,linked statically and try again,
busybox works fine, whether bringing up ppp interface or not.
emmm, strange behavior in uClibc-0.9.30.1/libc/inet/getaddrinfo.c.
_________________________________________________________________
上Windows Live 中国首页,下载最新版Messenger!
http://im.live.cn/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/uclibc/attachments/20090420/ce907466/attachment.htm>
More information about the uClibc
mailing list