summaryrefslogtreecommitdiff
path: root/sys/net/rtsock.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2019-11-24 07:56:04 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2019-11-24 07:56:04 +0000
commit4422d936645940c95b2bb982e722ba78b9b62342 (patch)
tree89bc1bbd3ea0ff62667eed9d22f62e9994342a95 /sys/net/rtsock.c
parentca2b8eec3b16e78f0718d7cf2ec094ab73d517c0 (diff)
If the RTM_PROPOSAL is a solicitation proposal forward the request to
all interfaces. Most handlers will ignore it but at least umb(4) will send a response back. OK florian@
Diffstat (limited to 'sys/net/rtsock.c')
-rw-r--r--sys/net/rtsock.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
index fb21a770d02..97a6c5b7c11 100644
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtsock.c,v 1.296 2019/11/22 15:28:05 florian Exp $ */
+/* $OpenBSD: rtsock.c,v 1.297 2019/11/24 07:56:03 claudio Exp $ */
/* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */
/*
@@ -815,6 +815,19 @@ route_output(struct mbuf *m, struct socket *so, struct sockaddr *dstaddr,
error = EINVAL;
goto fail;
}
+ /*
+ * If this is a solicitation proposal forward request to
+ * all interfaces. Most handlers will ignore it but at least
+ * umb(4) will send a response to this event.
+ */
+ if (rtm->rtm_priority == RTP_PROPOSAL_SOLICIT) {
+ struct ifnet *ifp;
+ NET_LOCK();
+ TAILQ_FOREACH(ifp, &ifnet, if_list) {
+ ifp->if_rtrequest(ifp, RTM_PROPOSAL, NULL);
+ }
+ NET_UNLOCK();
+ }
} else {
error = rtm_output(rtm, &rt, &info, prio, tableid);
if (!error) {