summaryrefslogtreecommitdiffstats
path: root/sys/sys/protosw.h
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2006-04-01 15:15:05 +0000
committerrwatson <rwatson@FreeBSD.org>2006-04-01 15:15:05 +0000
commit8622e776f910513e077d822efc579cdb9ba09316 (patch)
tree9714c8659826516cd802bd3b0a45d778b7ebb1a6 /sys/sys/protosw.h
parent6b3805592d02e666e50f1d4473fb18c587d69a75 (diff)
downloadFreeBSD-src-8622e776f910513e077d822efc579cdb9ba09316.zip
FreeBSD-src-8622e776f910513e077d822efc579cdb9ba09316.tar.gz
Change protocol switch pru_abort() API so that it returns void rather
than an int, as an error here is not meaningful. Modify soabort() to unconditionally free the socket on the return of pru_abort(), and modify most protocols to no longer conditionally free the socket, since the caller will do this. This commit likely leaves parts of netinet and netinet6 in a situation where they may panic or leak memory, as they have not are not fully updated by this commit. This will be corrected shortly in followup commits to these components. MFC after: 3 months
Diffstat (limited to 'sys/sys/protosw.h')
-rw-r--r--sys/sys/protosw.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/sys/protosw.h b/sys/sys/protosw.h
index bcf263f..5f39c69 100644
--- a/sys/sys/protosw.h
+++ b/sys/sys/protosw.h
@@ -196,7 +196,7 @@ struct uio;
*/
struct pr_usrreqs {
double __Break_the_struct_layout_for_now;
- int (*pru_abort)(struct socket *so);
+ void (*pru_abort)(struct socket *so);
int (*pru_accept)(struct socket *so, struct sockaddr **nam);
int (*pru_attach)(struct socket *so, int proto, struct thread *td);
int (*pru_bind)(struct socket *so, struct sockaddr *nam,
@@ -246,7 +246,7 @@ struct pr_usrreqs {
* All nonvoid pru_*() functions below return EOPNOTSUPP.
*/
-int pru_abort_notsupp(struct socket *so);
+void pru_abort_notsupp(struct socket *so);
int pru_accept_notsupp(struct socket *so, struct sockaddr **nam);
int pru_attach_notsupp(struct socket *so, int proto, struct thread *td);
int pru_bind_notsupp(struct socket *so, struct sockaddr *nam,
OpenPOWER on IntegriCloud