Page MenuHomeFreeBSD

D36158.diff
No OneTemporary

D36158.diff

Index: sys/kern/uipc_domain.c
===================================================================
--- sys/kern/uipc_domain.c
+++ sys/kern/uipc_domain.c
@@ -90,31 +90,6 @@
static struct mtx dom_mtx; /* domain list lock */
MTX_SYSINIT(domain, &dom_mtx, "domain list", MTX_DEF);
-/*
- * Dummy protocol specific user requests function pointer array.
- * All functions return EOPNOTSUPP.
- */
-struct pr_usrreqs nousrreqs = {
- .pru_accept = pru_accept_notsupp,
- .pru_attach = pru_attach_notsupp,
- .pru_bind = pru_bind_notsupp,
- .pru_connect = pru_connect_notsupp,
- .pru_connect2 = pru_connect2_notsupp,
- .pru_control = pru_control_notsupp,
- .pru_disconnect = pru_disconnect_notsupp,
- .pru_listen = pru_listen_notsupp,
- .pru_peeraddr = pru_peeraddr_notsupp,
- .pru_rcvd = pru_rcvd_notsupp,
- .pru_rcvoob = pru_rcvoob_notsupp,
- .pru_send = pru_send_notsupp,
- .pru_sense = pru_sense_null,
- .pru_shutdown = pru_shutdown_notsupp,
- .pru_sockaddr = pru_sockaddr_notsupp,
- .pru_sosend = pru_sosend_notsupp,
- .pru_soreceive = pru_soreceive_notsupp,
- .pru_sopoll = pru_sopoll_notsupp,
-};
-
static void
pr_usrreqs_init(struct protosw *pr)
{
@@ -454,7 +429,7 @@
dpr->pr_fasttimo = NULL;
dpr->pr_slowtimo = NULL;
dpr->pr_drain = NULL;
- dpr->pr_usrreqs = &nousrreqs;
+ dpr->pr_usrreqs = NULL;
/* Job is done, not more protection required. */
mtx_unlock(&dom_mtx);
Index: sys/kern/uipc_socket.c
===================================================================
--- sys/kern/uipc_socket.c
+++ sys/kern/uipc_socket.c
@@ -523,7 +523,7 @@
return (EPROTOTYPE);
return (EPROTONOSUPPORT);
}
- if (prp->pr_usrreqs->pru_attach == NULL ||
+ if (prp->pr_usrreqs == NULL || prp->pr_usrreqs->pru_attach == NULL ||
prp->pr_usrreqs->pru_attach == pru_attach_notsupp)
return (EPROTONOSUPPORT);
Index: sys/netinet/in_proto.c
===================================================================
--- sys/netinet/in_proto.c
+++ sys/netinet/in_proto.c
@@ -86,8 +86,6 @@
* TCP/IP protocol family: IP, ICMP, UDP, TCP.
*/
-static struct pr_usrreqs nousrreqs;
-
#ifdef SCTP
#include <netinet/in_pcb.h>
#include <netinet/sctp_pcb.h>
@@ -104,19 +102,9 @@
{ \
.pr_domain = &inetdomain, \
.pr_protocol = PROTO_SPACER, \
- .pr_usrreqs = &nousrreqs \
}
struct protosw inetsw[] = {
-{
- .pr_type = 0,
- .pr_domain = &inetdomain,
- .pr_protocol = IPPROTO_IP,
- .pr_flags = PR_CAPATTACH,
- .pr_slowtimo = ip_slowtimo,
- .pr_drain = ip_drain,
- .pr_usrreqs = &nousrreqs
-},
{
.pr_type = SOCK_DGRAM,
.pr_domain = &inetdomain,
Index: sys/netinet6/in6_proto.c
===================================================================
--- sys/netinet6/in6_proto.c
+++ sys/netinet6/in6_proto.c
@@ -127,7 +127,6 @@
FEATURE(inet6, "Internet Protocol version 6");
extern struct domain inet6domain;
-static struct pr_usrreqs nousrreqs;
#define PR_LISTEN 0
#define PR_ABRTACPTDIS 0
@@ -137,7 +136,6 @@
{ \
.pr_domain = &inet6domain, \
.pr_protocol = PROTO_SPACER, \
- .pr_usrreqs = &nousrreqs \
}
struct protosw inet6sw[] = {
@@ -148,7 +146,6 @@
.pr_flags = PR_CAPATTACH,
.pr_slowtimo = frag6_slowtimo,
.pr_drain = frag6_drain,
- .pr_usrreqs = &nousrreqs,
},
{
.pr_type = SOCK_DGRAM,
@@ -219,27 +216,6 @@
.pr_slowtimo = icmp6_slowtimo,
.pr_usrreqs = &rip6_usrreqs
},
-{
- .pr_type = SOCK_RAW,
- .pr_domain = &inet6domain,
- .pr_protocol = IPPROTO_DSTOPTS,
- .pr_flags = PR_ATOMIC|PR_ADDR,
- .pr_usrreqs = &nousrreqs
-},
-{
- .pr_type = SOCK_RAW,
- .pr_domain = &inet6domain,
- .pr_protocol = IPPROTO_ROUTING,
- .pr_flags = PR_ATOMIC|PR_ADDR,
- .pr_usrreqs = &nousrreqs
-},
-{
- .pr_type = SOCK_RAW,
- .pr_domain = &inet6domain,
- .pr_protocol = IPPROTO_FRAGMENT,
- .pr_flags = PR_ATOMIC|PR_ADDR,
- .pr_usrreqs = &nousrreqs
-},
#ifdef INET
{
.pr_type = SOCK_RAW,

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 16, 3:08 PM (21 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14660534
Default Alt Text
D36158.diff (3 KB)

Event Timeline