summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2007-03-16 10:56:32 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2007-03-16 10:56:32 +0000
commit18cfcaf08d56dbea951813cc108b1a4d48d41270 (patch)
tree6b9bec40b0007f7ed977878b616c5334b69e001f
parent7447ddeae630e7d55ef508d37acfed959e6450e2 (diff)
Don't forget to set the metric in the REDIST_LABEL case. OK pyr@
-rw-r--r--usr.sbin/ospfd/ospfd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/ospfd/ospfd.c b/usr.sbin/ospfd/ospfd.c
index a1a5ebba837..a785401edc9 100644
--- a/usr.sbin/ospfd/ospfd.c
+++ b/usr.sbin/ospfd/ospfd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ospfd.c,v 1.41 2007/02/01 13:25:28 claudio Exp $ */
+/* $OpenBSD: ospfd.c,v 1.42 2007/03/16 10:56:31 claudio Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -511,8 +511,10 @@ ospf_redistribute(struct kroute *kr, u_int32_t *metric)
SIMPLEQ_FOREACH(r, &ospfd_conf->redist_list, entry) {
switch (r->type & ~REDIST_NO) {
case REDIST_LABEL:
- if (kr->rtlabel == r->label)
+ if (kr->rtlabel == r->label) {
+ *metric = r->metric;
return (r->type & REDIST_NO ? 0 : 1);
+ }
break;
case REDIST_STATIC:
/*