summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2010-03-24 19:13:11 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2010-03-24 19:13:11 +0000
commit51a1327c0e790cf1391a05fea0ff99147e496fd4 (patch)
tree9f9bd96ddb8a9513fb0ed17520b49e694b10c44a
parent33296c688e60a750144592ca83bd2c79889dd9d2 (diff)
We need to set the rtm_priority when changing a route so that we do not
modify a possible better route instead. A bit more is still needed. OK michele@
-rw-r--r--usr.sbin/ldpd/kroute.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ldpd/kroute.c b/usr.sbin/ldpd/kroute.c
index 54565af283d..ab95aaac79b 100644
--- a/usr.sbin/ldpd/kroute.c
+++ b/usr.sbin/ldpd/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.7 2010/03/03 10:17:05 claudio Exp $ */
+/* $OpenBSD: kroute.c,v 1.8 2010/03/24 19:13:10 claudio Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -1045,7 +1045,7 @@ send_rtmsg(int fd, int action, struct kroute *kroute, u_int32_t family)
dst.sin_family = AF_INET;
dst.sin_addr.s_addr = kroute->prefix.s_addr;
/* adjust header */
- hdr.rtm_priority = 0;
+ hdr.rtm_priority = kroute->priority;
hdr.rtm_addrs |= RTA_DST;
hdr.rtm_msglen += sizeof(dst);
/* adjust iovec */