[mpls-linux-devel] A few problems with ldpd
Status: Beta
Brought to you by:
jleu
From: Scott A. Y. <sy...@im...> - 2008-03-24 21:18:10
|
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... |