On 07/07/2008 14:49, Filippo Zangheri wrote: > ... > > Yes, I have evidence of 'ad' being NULL. > > I added the following check right after the declaration of that pointer: > > if (ad == NULL) continue; > > And the segfault disappears. The only different behaviour is that loopback > address 127.0.0.1 is not listed in host alias addresses: > > ... Update: I've made some tests with and without patch (ad NULL check), and with and without ppp connection (I use a PPPoE connection to Internet). Here are the results: 1. ppp connection active and no patch: Segfault. 2. ppp connection active and patch: pjsip shows the following addresses: 15:37:52.525 stateful_proxy Local host aliases: 15:37:52.525 stateful_proxy 82.59.213.185:5060 15:37:52.525 stateful_proxy 192.168.2.20:5060 15:37:52.525 stateful_proxy asus-laptop:5060 15:37:52.525 stateful_proxy localhost:5060 3. ppp connectino inactive and no patch: pjsip shows the following addresses: 15:39:34.583 stateful_proxy Local host aliases: 15:39:34.583 stateful_proxy 127.0.0.1:5060 15:39:34.583 stateful_proxy asus-laptop:5060 15:39:34.583 stateful_proxy localhost:5060 4. ppp connection inactive and patch: pjsip shows the following addresses (same as before): 15:40:29.949 stateful_proxy Local host aliases: 15:40:29.949 stateful_proxy 127.0.0.1:5060 15:40:29.949 stateful_proxy asus-laptop:5060 15:40:29.949 stateful_proxy localhost:5060 It seems that getifaddrs() gets confused when a ppp interface is active. It would be great if somebody could test stateful_proxy (or stateless) on Linux with a ppp connection active. If I got more reports I'd report this problem to netdev at vger.kernel.org, the Linux kernel network developers' mailing list. Thanks. -- Filippo Zangheri GPG key ID: 0x6C1F2F2F -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: OpenPGP digital signature Url : http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080707/6cd39c9d/attachment.bin