Module Name: src Committed By: kefren Date: Wed Jun 15 18:16:48 UTC 2011
Modified Files: src/usr.sbin/ldpd: tlv_stack.c Log Message: we need to add mapping even if there is no route for the prefix To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/ldpd/tlv_stack.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.sbin/ldpd/tlv_stack.c diff -u src/usr.sbin/ldpd/tlv_stack.c:1.3 src/usr.sbin/ldpd/tlv_stack.c:1.4 --- src/usr.sbin/ldpd/tlv_stack.c:1.3 Thu Feb 10 12:44:41 2011 +++ src/usr.sbin/ldpd/tlv_stack.c Wed Jun 15 18:16:48 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tlv_stack.c,v 1.3 2011/02/10 12:44:41 kefren Exp $ */ +/* $NetBSD: tlv_stack.c,v 1.4 2011/06/15 18:16:48 kefren Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -110,14 +110,13 @@ debugp("Prefix/Host add: %s/%d\n", inet_ntoa(inatmp), pref->prelen); - /* don't bother if we don't have a label/route */ - if (label_get_by_prefix(&inatmp, pref->prelen) == NULL) - break; - ldp_peer_add_mapping(p, &inatmp, pref->prelen, ntohl(l->label)); - mpls_add_label(p, NULL, &inatmp, pref->prelen, - ntohl(l->label), 1); + + /* Try to change RIB only if label is installed */ + if (label_get_by_prefix(&inatmp, pref->prelen) != NULL) + mpls_add_label(p, NULL, &inatmp, pref->prelen, + ntohl(l->label), 1); break; case FEC_WILDCARD: fatalp("LDP: Wildcard add from peer %s\n",