[PATCH] bug in __check_pf() (getaddrinfo.c)

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Mon Dec 8 13:15:18 UTC 2008


On Mon, Dec 08, 2008 at 10:35:50AM +0100, Carmelo Amoroso wrote:
>On 07/12/2008, Ricard Wanderlof <ricard.wanderlof at axis.com> wrote:
>>
>> On Sat, 6 Dec 2008, Hiroshi Shinji wrote:
>>
>>> Hi Khem,
>>> Thanks for your comment.
>>>
>>> 2008/12/6 Khem Raj <raj.khem at gmail.com>:
>>>> Getting NULL for ifa_addr means that the interface has no address. Do
>>>> you know in what cases does this happen. Patch looks ok though.
>>>
>>> True. My environment has a interface that has no address.
>>>
>>> And, previous source code had another problem. 'for' statement had no
>>> '{' and '}'. Therefore, If you defined both __UCLIBC_HAS_IPV4__ and
>>> __UCLIBC_HAS_IPV6__, the second 'if' statement would be outside of the
>>> for-loop and occure segfault.
>>
>> This stuff seems to continuously come back and haunt me ... :-( (I was the
>> original poster of check_pf-stuff, although it has been modified since
>> then so can't take credit for all the problems. :-) Patch looks good to me
>> anyway.
>>
>> /Ricard
>> --
>> Ricard Wolf Wanderl�f                           ricardw(at)axis.com
>> Axis Communications AB, Lund, Sweden            www.axis.com
>> Phone +46 46 272 2016                           Fax +46 46 13 61 30
>>
>
>Khem,
>may you give a try at this patch on nptl branch ? I'm wondering if
>this is the cause
>of the segfault we are seeing in sysv-init. I've merged getaddrinfo.c
>on nptl branch,
>and IIRC my config has both ipv4 and ipv6 support enabled.
>Unfortunately I don't have access to my box today... anyway  I'll
>restart with the investigation
>tomorrow.

I've applied the other patch to fix the loop to look for both IPv4 and
IPv6 addresses (trunk r24317).



More information about the uClibc mailing list