diff options
author | 2015-09-01 10:04:51 +0000 | |
---|---|---|
committer | 2015-09-01 10:04:51 +0000 | |
commit | 97b74e8e39a6d7120d08709787e5db08b57ef75b (patch) | |
tree | c0e6cd720bbc57b9c68c98a6b6dbc891ffa3193e | |
parent | Move initial conf load into cfg.c. (diff) | |
download | wireguard-openbsd-97b74e8e39a6d7120d08709787e5db08b57ef75b.tar.xz wireguard-openbsd-97b74e8e39a6d7120d08709787e5db08b57ef75b.zip |
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@
-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; |