Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Quagga: Dev

Crash in BGP code. . . .

 

 

Quagga dev RSS feed   Index | Next | Previous | View Threaded


MP0075847 at techmahindra

Jun 15, 2012, 2:55 AM

Post #1 of 2 (199 views)
Permalink
Crash in BGP code. . . .

Hi All,

I have added the new cli command in bgp_vty.c file. The command is to give the VEID to the router.

Below is the piece of code pasted

/* Set BGP LABEL BASE*/
DEFUN (bgp_router_labelbase,
bgp_router_labelbase_cmd,
"bgp router-labelbase LABELBASE",
BGP_STR
"Override configured router label base\n"
"Manually configured router label base\n")
{
static struct bgp *bgp;
bgp = vty->index;
vty_out(vty, "LABEL BASE=%s%s", argv[0], VTY_NEWLINE);
bgp->vpls_par.label_base = (u_int32_t)atoi(argv[0]);
bgp_router_labelbase_set(bgp, atoi(argv[0]));
return CMD_SUCCESS;
}

The problem is marked in red. When the PC hits the place it is crashing. So i suspect the stack corruption.

Any anybody help me in solving this problem?

Thanks in advance . . .

Manjunath Patil | PROD ENGG | Tech Mahindra
TechM - Bangalore - Hosur Road, Bangalore 560029, INDIA
( Office: +91 80 40249000 | Mobile: +91 9986016150
Email: mp0075847 [at] techmahindra
www.techmahindra.com <http://www.techmahindra.com/>


============================================================================================================================
Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the
Tech Mahindra policy statement, you may review the policy at <a href="http://www.techmahindra.com/Disclaimer.html">http://www.techmahindra.com/Disclaimer.html</a>
externally and <a href="http://tim.techmahindra.com/tim/disclaimer.html">http://tim.techmahindra.com/tim/disclaimer.html</a> internally within Tech Mahindra.
============================================================================================================================


infrastation at yandex

Jun 15, 2012, 4:11 AM

Post #2 of 2 (187 views)
Permalink
Re: Crash in BGP code. . . . [In reply to]

> š bgp = vty->index;

The global BGP process structure may be non-existent by that time. It may help to change the command from "bgp router-labelbase" to "labelbase" inside a "router bgp" block. The latter will create and properly initialize a BGP instance.

--
Denis Ovsienko
_______________________________________________
Quagga-dev mailing list
Quagga-dev [at] lists
http://lists.quagga.net/mailman/listinfo/quagga-dev

Quagga dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.