diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-09-01 10:04:52 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-09-01 10:04:52 +0000 |
commit | bc3d8779872d9c392c651eb6765cfc081ee5ceb7 (patch) | |
tree | 33c47dfde1c20c92d182a9dda8e7e9d6472c3a8b /sys | |
parent | 3f731f511581db20a4b8b0d3091216360fb21229 (diff) |
Do not try to find a possible ``ifa'' in rt_ifal_del(9) and trust the
checks done in rtrequest1(9).
This chunk has been introduced in 1991 when rtrequest1(RTM_DELETE...)
was not doing a route lookup and no longer make any sense.
ok bluhm@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/route.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/sys/net/route.c b/sys/net/route.c index 051497eb2c0..7ae25cb5a93 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.226 2015/08/30 10:39:16 mpi Exp $ */ +/* $OpenBSD: route.c,v 1.227 2015/09/01 10:04:51 mpi Exp $ */ /* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */ /* @@ -1233,21 +1233,6 @@ rt_ifa_del(struct ifaddr *ifa, int flags, struct sockaddr *dst) rt_maskedcopy(dst, deldst, ifa->ifa_netmask); dst = deldst; } - if ((rt = rtalloc(dst, 0, rtableid)) != NULL) { - rt->rt_refcnt--; -#ifndef ART - /* try to find the right route */ - while (rt && rt->rt_ifa != ifa) - rt = (struct rtentry *) - ((struct radix_node *)rt)->rn_dupedkey; - if (!rt) { - if (m != NULL) - (void) m_free(m); - return (flags & RTF_HOST ? EHOSTUNREACH - : ENETUNREACH); - } -#endif - } memset(&info, 0, sizeof(info)); info.rti_ifa = ifa; |