summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2006-05-27 19:28:20 +0000
committerclaudio <claudio@openbsd.org>2006-05-27 19:28:20 +0000
commit9edfd91308347120a8e80e1ca383548fe462d780 (patch)
tree789ff57fd428834a82a5b70c7e728461f31b74e5
parentKill upHex and use %X instead. Crazy old code found by deraadt. (diff)
downloadwireguard-openbsd-9edfd91308347120a8e80e1ca383548fe462d780.tar.xz
wireguard-openbsd-9edfd91308347120a8e80e1ca383548fe462d780.zip
Revert last commit. Having ifindex of 0 is an error and needs to be reported.
Having routes with incorrect ifindex makes it impossible to correctly validate routes. -current ospfd needs a -current kernel.
-rw-r--r--usr.sbin/ospfd/kroute.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/usr.sbin/ospfd/kroute.c b/usr.sbin/ospfd/kroute.c
index 318b887a424..1cbf4c94653 100644
--- a/usr.sbin/ospfd/kroute.c
+++ b/usr.sbin/ospfd/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.31 2006/04/28 15:46:10 henning Exp $ */
+/* $OpenBSD: kroute.c,v 1.32 2006/05/27 19:28:20 claudio Exp $ */
/*
* Copyright (c) 2004 Esben Norby <norby@openbsd.org>
@@ -535,9 +535,7 @@ kif_validate(int ifindex)
struct kif_node *kif;
if ((kif = kif_find(ifindex)) == NULL) {
- if (ifindex > 0)
- log_warnx("interface with index %u not found",
- ifindex);
+ log_warnx("interface with index %u not found", ifindex);
return (1);
}
@@ -645,8 +643,7 @@ if_change(u_short ifindex, int flags, struct if_data *ifd)
u_int8_t reachable;
if ((kif = kif_find(ifindex)) == NULL) {
- log_warnx("interface with index %u not found",
- ifindex);
+ log_warnx("interface with index %u not found", ifindex);
return;
}