diff options
author | Vitaliy Makkoveev <mvs@cvs.openbsd.org> | 2022-09-02 13:12:33 +0000 |
---|---|---|
committer | Vitaliy Makkoveev <mvs@cvs.openbsd.org> | 2022-09-02 13:12:33 +0000 |
commit | b32c31e5f7563219bb9f4824455258360e04034b (patch) | |
tree | b4ce1fa5312e0e2f322b18d1a2a880fc8ae533b4 /sys/netinet6 | |
parent | 7f9b39371dd6e00a3be630e6c7951f6132cfb782 (diff) |
Move PRU_CONTROL request to (*pru_control)().
The 'proc *' arg is not used for PRU_CONTROL request, so remove it from
pru_control() wrapper.
Split out {tcp,udp}6_usrreqs from {tcp,udp}_usrreqs and use them for
inet6 case.
ok guenther@ bluhm@
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/in6_proto.c | 6 | ||||
-rw-r--r-- | sys/netinet6/ip6_divert.c | 8 | ||||
-rw-r--r-- | sys/netinet6/raw_ip6.c | 7 |
3 files changed, 7 insertions, 14 deletions
diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c index 01da0ec2219..808422f6eab 100644 --- a/sys/netinet6/in6_proto.c +++ b/sys/netinet6/in6_proto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6_proto.c,v 1.110 2022/08/15 09:11:39 mvs Exp $ */ +/* $OpenBSD: in6_proto.c,v 1.111 2022/09/02 13:12:32 mvs Exp $ */ /* $KAME: in6_proto.c,v 1.66 2000/10/10 15:35:47 itojun Exp $ */ /* @@ -140,7 +140,7 @@ const struct protosw inet6sw[] = { .pr_input = udp_input, .pr_ctlinput = udp6_ctlinput, .pr_ctloutput = ip6_ctloutput, - .pr_usrreqs = &udp_usrreqs, + .pr_usrreqs = &udp6_usrreqs, .pr_sysctl = udp_sysctl }, { @@ -151,7 +151,7 @@ const struct protosw inet6sw[] = { .pr_input = tcp_input, .pr_ctlinput = tcp6_ctlinput, .pr_ctloutput = tcp_ctloutput, - .pr_usrreqs = &tcp_usrreqs, + .pr_usrreqs = &tcp6_usrreqs, .pr_sysctl = tcp_sysctl }, { diff --git a/sys/netinet6/ip6_divert.c b/sys/netinet6/ip6_divert.c index 8f1c4763f58..d1800b14c39 100644 --- a/sys/netinet6/ip6_divert.c +++ b/sys/netinet6/ip6_divert.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_divert.c,v 1.82 2022/09/01 18:21:23 mvs Exp $ */ +/* $OpenBSD: ip6_divert.c,v 1.83 2022/09/02 13:12:32 mvs Exp $ */ /* * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> @@ -71,6 +71,7 @@ const struct pr_usrreqs divert6_usrreqs = { .pru_shutdown = divert6_shutdown, .pru_send = divert6_send, .pru_abort = divert6_abort, + .pru_control = in6_control, }; int divb6hashsize = DIVERTHASHSIZE; @@ -264,11 +265,6 @@ divert6_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *addr, struct inpcb *inp = sotoinpcb(so); int error = 0; - if (req == PRU_CONTROL) { - return (in6_control(so, (u_long)m, (caddr_t)addr, - (struct ifnet *)control)); - } - soassertlocked(so); if (inp == NULL) { diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c index 20b4032cc6c..0bae4da3a35 100644 --- a/sys/netinet6/raw_ip6.c +++ b/sys/netinet6/raw_ip6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: raw_ip6.c,v 1.165 2022/09/01 18:21:23 mvs Exp $ */ +/* $OpenBSD: raw_ip6.c,v 1.166 2022/09/02 13:12:32 mvs Exp $ */ /* $KAME: raw_ip6.c,v 1.69 2001/03/04 15:55:44 itojun Exp $ */ /* @@ -115,6 +115,7 @@ const struct pr_usrreqs rip6_usrreqs = { .pru_shutdown = rip6_shutdown, .pru_send = rip6_send, .pru_abort = rip6_abort, + .pru_control = in6_control, }; /* @@ -580,10 +581,6 @@ rip6_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, struct inpcb *in6p; int error = 0; - if (req == PRU_CONTROL) - return (in6_control(so, (u_long)m, (caddr_t)nam, - (struct ifnet *)control)); - soassertlocked(so); in6p = sotoinpcb(so); |