summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2013-05-17 11:13:38 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2013-05-17 11:13:38 +0000
commitf083f1f074d50aa7a8ffa420ad964c330469fe2e (patch)
tree1d802fdbdc94d079270d6335e1c1b16dd45be861 /sys
parentf14392a1ee69c0c4abb9a85a31c36cbdaeecd926 (diff)
Do not attempt to delete the undeletable RNF_ROOT route.
Discovered & fix tested by Peter J Philip. ok claudio@ blambert@
Diffstat (limited to 'sys')
-rw-r--r--sys/net/rtsock.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
index 5965a68ef70..dcc1e7a4e9b 100644
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtsock.c,v 1.125 2013/03/15 20:45:34 tedu Exp $ */
+/* $OpenBSD: rtsock.c,v 1.126 2013/05/17 11:13:37 krw Exp $ */
/* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */
/*
@@ -621,6 +621,7 @@ route_output(struct mbuf *m, ...)
rn = (struct radix_node *)rt;
if (rn == NULL || (rn->rn_flags & RNF_ROOT) != 0) {
error = ESRCH;
+ rt = NULL;
goto flush;
}
#ifndef SMALL_KERNEL