From 65bec93bcec0083b289219fcf3518d1992185999 Mon Sep 17 00:00:00 2001 From: Martin Pieuchot Date: Tue, 29 Jul 2014 12:18:42 +0000 Subject: Revert the checks about RTF_LOCAL routes. Even if in the end we would like to be more strict about what userland can do with kernel-managed route entries, most of the tools out there are not yet ready for this. Since RTF_LOCAL routes are for the moment just like RTF_LLINFO routes without expire timer, allow userland tools to remove/modify them. In case they are missing, the good old cloning mechanism will recreate what you need. bluhm@ and deraadt@ agree. --- sys/net/route.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'sys/net/route.c') diff --git a/sys/net/route.c b/sys/net/route.c index 1f8f7635b89..a8b6dd36433 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.174 2014/07/12 18:44:22 tedu Exp $ */ +/* $OpenBSD: route.c,v 1.175 2014/07/29 12:18:41 mpi Exp $ */ /* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */ /* @@ -787,14 +787,6 @@ rtrequest1(int req, struct rt_addrinfo *info, u_int8_t prio, } #endif - /* - * Since RTP_LOCAL cannot be set by userland, make - * sure that local routes are only modified by the - * kernel. - */ - if (rt->rt_flags & RTF_LOCAL && prio != RTP_LOCAL) - senderr(EINVAL); - if ((rn = rnh->rnh_deladdr(info->rti_info[RTAX_DST], info->rti_info[RTAX_NETMASK], rnh, rn)) == NULL) senderr(ESRCH); -- cgit v1.2.3