we need to add mapping even if there is no route for the prefix
This commit is contained in:
parent
fc85e71227
commit
0c4a44d22f
|
@ -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,12 +110,11 @@ map_label(struct ldp_peer * p, struct fec_tlv * f, struct label_tlv * l)
|
|||
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));
|
||||
|
||||
/* 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;
|
||||
|
|
Loading…
Reference in New Issue