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.
|
* Copyright (c) 2010 The NetBSD Foundation, Inc.
|
||||||
|
@ -110,14 +110,13 @@ map_label(struct ldp_peer * p, struct fec_tlv * f, struct label_tlv * l)
|
||||||
debugp("Prefix/Host add: %s/%d\n", inet_ntoa(inatmp),
|
debugp("Prefix/Host add: %s/%d\n", inet_ntoa(inatmp),
|
||||||
pref->prelen);
|
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,
|
ldp_peer_add_mapping(p, &inatmp, pref->prelen,
|
||||||
ntohl(l->label));
|
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;
|
break;
|
||||||
case FEC_WILDCARD:
|
case FEC_WILDCARD:
|
||||||
fatalp("LDP: Wildcard add from peer %s\n",
|
fatalp("LDP: Wildcard add from peer %s\n",
|
||||||
|
|
Loading…
Reference in New Issue