summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrenato <renato@openbsd.org>2013-10-15 21:54:19 +0000
committerrenato <renato@openbsd.org>2013-10-15 21:54:19 +0000
commita4d777528ad42a3895d839774d80d52dc8a26e9e (patch)
treef386f30d793718e7b1a129f4fa4d6917c38a565e
parentMinor fixes on if_del() and nbr_new(). (diff)
downloadwireguard-openbsd-a4d777528ad42a3895d839774d80d52dc8a26e9e.tar.xz
wireguard-openbsd-a4d777528ad42a3895d839774d80d52dc8a26e9e.zip
Don't bind a label for the default route.
After discussing with claudio@ we came to the conclusion that it's more safe to ignore the default route and don't bind a label for it. OK @claudio
-rw-r--r--usr.sbin/ldpd/kroute.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/ldpd/kroute.c b/usr.sbin/ldpd/kroute.c
index b7f03b6ec72..f7b632fa026 100644
--- a/usr.sbin/ldpd/kroute.c
+++ b/usr.sbin/ldpd/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.30 2013/10/15 20:21:25 renato Exp $ */
+/* $OpenBSD: kroute.c,v 1.31 2013/10/15 21:54:19 renato Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -422,11 +422,12 @@ kr_redist_eval(struct kroute *kr)
goto dont_redistribute;
/*
- * We consider the loopback net, multicast and experimental addresses
- * as not redistributable.
+ * We consider the loopback net, default route, multicast and
+ * experimental addresses as not redistributable.
*/
a = ntohl(kr->prefix.s_addr);
if (IN_MULTICAST(a) || IN_BADCLASS(a) ||
+ (kr->prefixlen == 0) ||
(a >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET)
goto dont_redistribute;
/*