Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/ldpd stop processing a label mapping message if we ...
details: https://anonhg.NetBSD.org/src/rev/22a145f71d5c
branches: trunk
changeset: 761896:22a145f71d5c
user: kefren <kefren%NetBSD.org@localhost>
date: Thu Feb 10 12:44:41 2011 +0000
description:
stop processing a label mapping message if we don't have a route for it.
This way we avoid failing an assert later in mpls_add_label()
diffstat:
usr.sbin/ldpd/tlv_stack.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diffs (21 lines):
diff -r bc82415c3696 -r 22a145f71d5c usr.sbin/ldpd/tlv_stack.c
--- a/usr.sbin/ldpd/tlv_stack.c Thu Feb 10 12:37:58 2011 +0000
+++ b/usr.sbin/ldpd/tlv_stack.c Thu Feb 10 12:44:41 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tlv_stack.c,v 1.2 2010/12/09 00:10:59 christos Exp $ */
+/* $NetBSD: tlv_stack.c,v 1.3 2011/02/10 12:44:41 kefren Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -109,6 +109,11 @@
memcpy(&inatmp, &pref->prefix, ldp_ceil8(pref->prelen));
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,
Home |
Main Index |
Thread Index |
Old Index