summaryrefslogtreecommitdiff
path: root/sys/net/route.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2015-09-22 10:05:01 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2015-09-22 10:05:01 +0000
commit75cea71333d6bf7312579747c8493dbc2560a1b7 (patch)
treeb7292fe906d0c2b236c27227668ea27f6eb22457 /sys/net/route.c
parentdd7de21b596a24acf977a7b0e96adfe3d1797c9f (diff)
When a connected route is deleted, pass the corresponding priority to
rtrequest1(9) otherwise the route will remain attached to a stale ifa. Found by matthieu@
Diffstat (limited to 'sys/net/route.c')
-rw-r--r--sys/net/route.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net/route.c b/sys/net/route.c
index bd949b585a8..0d25cdcdc94 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.240 2015/09/21 11:15:27 mpi Exp $ */
+/* $OpenBSD: route.c,v 1.241 2015/09/22 10:05:00 mpi Exp $ */
/* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */
/*
@@ -1268,6 +1268,9 @@ rt_ifa_del(struct ifaddr *ifa, int flags, struct sockaddr *dst)
if (flags & (RTF_LOCAL|RTF_BROADCAST))
prio = RTP_LOCAL;
+ if (flags & RTF_CONNECTED)
+ prio = RTP_CONNECTED;
+
error = rtrequest1(RTM_DELETE, &info, prio, &rt, rtableid);
if (error == 0) {
rt_sendmsg(rt, RTM_DELETE, rtableid);