Re: [mpls-linux-devel] A few problems with ldpd
Status: Beta
Brought to you by:
jleu
From: James R. L. <jl...@mi...> - 2008-03-25 01:35:53
|
Good stuff. Thank you for working with ldp-portable and taking the time to dig into the code. I've incorporated your fixes for the memory leaks and I'm double checking the byte order fix you suggest. As far as the multiple session issue, I think the fix is to never send any 127.0.0.0/8 addresses in the address message. One way to accomplish this is to never register 127.0.0.0/8 addresses with LDP by modifing ldp_interface_address_add() in ldp_zebra.c. On Mon, Mar 24, 2008 at 04:58:20PM -0400, Scott A. Yoder wrote: > Hi James. I've been able to get ldpd working quite well with 3 routers in my testbed. Even > the targeted ldp sessions now appear to be working. I have a left LSR, middle, LSR and right LSR. The > targeted session is between the left and right routers. > > I've found a few problems and want to get your take on how best to fix them. > > 1) The xconnect command needs to have the destination IP address stored in host byte order. > > --- ldp_vty.c Tue Mar 25 01:19:59 2008 > +++ ldp_vty-new.c Wed Mar 19 01:55:44 2008 > @@ -1618,6 +1618,7 @@ > dest.port = 646; > > VTY_GET_UINT32_RANGE("VCID",vcid,argv[1],0,255); > + dest.addr.u.ipv4 = ntohl(dest.addr.u.ipv4); > > if (ldp_remote_peer_find(ldp, &dest)) { > return CMD_WARNING; > > > 2) I found a couple of memory leaks with valgrind: > > --- ldp_session.c Fri Jan 4 23:58:59 2008 > +++ ldp_session-new.c Tue Mar 25 01:25:32 2008 > @@ -252,6 +252,8 @@ > { > LDP_PRINT(NULL, "session delete"); > MPLS_REFCNT_ASSERT(s, 0); > + ldp_buf_delete(s->tx_buffer); > + ldp_mesg_delete(s->tx_message); > mpls_free(s); > } > > --- ldp_buf.c Tue Mar 25 01:29:01 2008 > +++ ldp_buf-new.c Fri Mar 21 21:18:06 2008 > @@ -49,6 +49,8 @@ > void ldp_buf_delete(ldp_buf * b) > { > MPLS_ASSERT(b); > + if (b->buffer) > + mpls_free(b->buffer); > mpls_free(b); > } > > > These 2 leaks caused ldpd to grow several megabytes per hour on my system. > > > 3) ldpd cannot establish more than 1 session at a time. > > I don't know if I have a config error but I keep getting a "ldp_addr_process: session X already advertised this address" > error when the 2nd router attempts to start up a session. I think the address is 127.0.0.1. I tried changing the lsr-id and > transport address but that caused ldpd to crash. The neighbor's status is stuck in the discovery state. > > Just to get around this problem and keep going I stuck a return MPLS_SUCCESS in ldpd/ldp_addr.c line 315: > > /* the addr is in the tree */ > if (addr->session) { > LDP_PRINT(g->user_data, > "ldp_addr_process: session (%d) already advertised this address\n", > addr->session->index); > return MPLS_SUCCESS; > return MPLS_FAILURE; > } > > Is there something I'm missing with the config to support multiple peers? > > Thanks, > Scott Yoder > Support Engineer > ImageStream Internet Solutions, Inc. > E-mail: sy...@im... > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > mpls-linux-devel mailing list > mpl...@li... > https://lists.sourceforge.net/lists/listinfo/mpls-linux-devel -- James R. Leu jl...@mi... |