summaryrefslogtreecommitdiff
path: root/sys/net/route.c
diff options
context:
space:
mode:
authordenis <denis@cvs.openbsd.org>2020-10-29 21:15:28 +0000
committerdenis <denis@cvs.openbsd.org>2020-10-29 21:15:28 +0000
commitdf7cbdab60153656c19a828195074a4d83bdb9e0 (patch)
tree5632d70895deead52edfa2e96b607e0325037343 /sys/net/route.c
parentd73c97ddaa729cc0794f44fca3741a91952d2c93 (diff)
Add feature to force the selection of source IP address
Based/previous work on an idea from deraadt@ Input from claudio@, djm@, deraadt@, sthen@ OK deraadt@
Diffstat (limited to 'sys/net/route.c')
-rw-r--r--sys/net/route.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net/route.c b/sys/net/route.c
index 0bbd5d3064e..99c3671d80b 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.396 2020/08/13 04:26:11 jmatthew Exp $ */
+/* $OpenBSD: route.c,v 1.397 2020/10/29 21:15:27 denis Exp $ */
/* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */
/*
@@ -1192,6 +1192,7 @@ rt_ifa_del(struct ifaddr *ifa, int flags, struct sockaddr *dst,
if (flags & RTF_CONNECTED)
prio = ifp->if_priority + RTP_CONNECTED;
+ rtable_clearsource(rdomain, ifa->ifa_addr);
error = rtrequest_delete(&info, prio, ifp, &rt, rdomain);
if (error == 0) {
rtm_send(rt, RTM_DELETE, 0, rdomain);