[quagga-dev 3530] Re: Quagga-dev Digest, Vol 24, Issue 1

scott collins scollins at oz.agile.tv
Mon Jul 4 00:03:16 BST 2005


quagga-dev-request at lists.quagga.net wrote:

>Send Quagga-dev mailing list submissions to
>	quagga-dev at lists.quagga.net
>
>To subscribe or unsubscribe via the World Wide Web, visit
>	http://lists.quagga.net/mailman/listinfo/quagga-dev
>or, via email, send a message with subject or body 'help' to
>	quagga-dev-request at lists.quagga.net
>
>You can reach the person managing the list at
>	quagga-dev-owner at lists.quagga.net
>
>When replying, please edit your Subject line so it is more specific
>than "Re: Contents of Quagga-dev digest..."
>
>
>Today's Topics:
>
>   1. [quagga-dev 3528] OSPF-API and libzebra problems
>      (Luiz Gustavo Zuliani)
>   2. [quagga-dev 3529] address-family vpnv4 configuration question
>      (Kris Olander)
>
>
>----------------------------------------------------------------------
>
>Message: 1
>Date: Thu, 30 Jun 2005 16:14:56 -0300
>From: "Luiz Gustavo Zuliani" <zuliani at lycos.com>
>Subject: [quagga-dev 3528] OSPF-API and libzebra problems
>To: quagga-dev at lists.quagga.net
>Message-ID: <20050630191456.4D8A7C6119 at ws7-5.us4.outblaze.com>
>Content-Type: text/plain
>
>Dear quagga-dev list members,
>
>I modified the OSPF-API client example (ospfclient) to transport a data structure that suit the needs of my application, and defined ready_callback function as follows:
>
>void
>ready_callback (u_char lsa_type, u_char opaque_type, struct in_addr addr)
>{
>  printf ("ready_callback: lsa_type: %d opaque_type: %d addr=%s\n",
>                  lsa_type, opaque_type, inet_ntoa (addr));
>
>        /* Schedule opaque-LSAs in 5 and 10 secs  */
>        thread_add_timer (master, my_lsa_inject, oclient, 5);  // #1
>        thread_add_timer (master, my_lsa_inject, oclient, 10); // #2
>        thread_add_timer (master, my_lsa_delete, oclient, 30); // #3
>}
>
>The program compiles without warnings, but when it's executed, it generated a Segmentation fault when calling the second "thread_add_timer", line #2 (that function calls thread_get from thread.c - libzebra - and it can't allocate memory to a new pointer):
>
>Program received signal SIGSEGV, Segmentation fault.
>0x401d40a6 in thread_get (m=0x403f0008, type=2 '\002', func=0x2, arg=0x2, funcname=0x804b57f "my_lsa_inject") at thread.c:428
>
>What is really driving me nuts is: if a comment lines #2 and #3 (leaving only #1 uncommented) the program runs OK, doing exactly what expected. If a comment lines #1 and #3 (leaving only line #2 uncommented), the program also run without any problems. 
>
>Does anyone know what might be causing such behavior ? By the way, is there another source of information about libzebra besides the source code ? And finally, how can I use pthreads instead of libzebra ?
>
>Best regards,
>
>Luiz Gustavo Zuliani
>
>  
>
At a guess, I would say that your function "my_lsa_inject" is trying to 
inject more than one opaque lsa with the same opaque ID. Just a guess, 
hope that it helps

Scott





More information about the Quagga-dev mailing list