Install pr_ctlport for the rest of the protocols.
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 1 Nov 2008 04:22:16 +0000 (04:22 +0000)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 1 Nov 2008 04:22:16 +0000 (04:22 +0000)
Reported-by: tomas@
sys/netbt/bt_proto.c
sys/netgraph/socket/ng_socket.c
sys/netproto/atalk/at_proto.c
sys/netproto/atm/atm_proto.c
sys/netproto/ipsec/keysock.c
sys/netproto/ipsec/xform_ipip.c
sys/netproto/ipx/ipx_proto.c
sys/netproto/key/keysock.c
sys/netproto/mpls/mpls_proto.c
sys/netproto/natm/natm_proto.c
sys/netproto/ns/ns_proto.c

index ea22497..2911455 100644 (file)
@@ -1,4 +1,4 @@
-/* $DragonFly: src/sys/netbt/bt_proto.c,v 1.6 2008/09/24 14:26:39 sephe Exp $ */
+/* $DragonFly: src/sys/netbt/bt_proto.c,v 1.7 2008/11/01 04:22:15 sephe Exp $ */
 /* $OpenBSD: bt_proto.c,v 1.4 2007/06/24 20:55:27 uwe Exp $ */
 
 /*
@@ -77,6 +77,7 @@ struct protosw btsw[] = {
                .pr_ctlinput = 0,
                .pr_ctloutput = hci_ctloutput,
                .pr_mport = cpu0_soport,
+               .pr_ctlport = NULL,
                .pr_init = 0,
                .pr_fasttimo =  0,
                .pr_slowtimo = 0,
@@ -93,6 +94,7 @@ struct protosw btsw[] = {
                .pr_ctlinput = 0,
                .pr_ctloutput = sco_ctloutput,
                .pr_mport = cpu0_soport,
+               .pr_ctlport = NULL,
                .pr_init = 0,
                .pr_fasttimo =  0,
                .pr_slowtimo = 0,
@@ -110,6 +112,7 @@ struct protosw btsw[] = {
                .pr_ctlinput = 0,
                .pr_ctloutput = l2cap_ctloutput,
                .pr_mport = cpu0_soport,
+               .pr_ctlport = NULL,
                .pr_init = 0,
                .pr_fasttimo =  0,
                .pr_slowtimo = 0,
@@ -126,6 +129,7 @@ struct protosw btsw[] = {
                .pr_ctlinput = 0,
                .pr_ctloutput = rfcomm_ctloutput,
                .pr_mport = cpu0_soport,
+               .pr_ctlport = NULL,
                .pr_init = 0,
                .pr_fasttimo =  0,
                .pr_slowtimo = 0,
index d4826e5..6e11ae0 100644 (file)
@@ -37,7 +37,7 @@
  * Author: Julian Elischer <julian@freebsd.org>
  *
  * $FreeBSD: src/sys/netgraph/ng_socket.c,v 1.11.2.6 2002/07/02 22:17:18 archie Exp $
- * $DragonFly: src/sys/netgraph/socket/ng_socket.c,v 1.16 2008/01/06 16:55:52 swildner Exp $
+ * $DragonFly: src/sys/netgraph/socket/ng_socket.c,v 1.17 2008/11/01 04:22:15 sephe Exp $
  * $Whistle: ng_socket.c,v 1.28 1999/11/01 09:24:52 julian Exp $
  */
 
@@ -931,7 +931,7 @@ static struct protosw ngsw[] = {
                NG_CONTROL,
                PR_ATOMIC | PR_ADDR /* | PR_RIGHTS */,
                0, 0, 0, 0,
-               cpu0_soport,
+               cpu0_soport, NULL,
                0, 0, 0, 0,
                &ngc_usrreqs
        },
@@ -941,7 +941,7 @@ static struct protosw ngsw[] = {
                NG_DATA,
                PR_ATOMIC | PR_ADDR,
                0, 0, 0, 0,
-               cpu0_soport,
+               cpu0_soport, NULL,
                0, 0, 0, 0,
                &ngd_usrreqs
        }
index b596826..d89956a 100644 (file)
@@ -20,7 +20,7 @@
  *     +1-313-763-0525
  *     netatalk@itd.umich.edu
  *
- * $DragonFly: src/sys/netproto/atalk/at_proto.c,v 1.6 2006/10/23 09:27:37 swildner Exp $
+ * $DragonFly: src/sys/netproto/atalk/at_proto.c,v 1.7 2008/11/01 04:22:15 sephe Exp $
  */
 
 #include <sys/param.h>
@@ -51,7 +51,7 @@ static struct protosw atalksw[] = {
         * they be included in the kernel.
         */
        0,              ddp_output,     0,              0,
-       cpu0_soport,
+       cpu0_soport,    NULL,
        /* utility routines. */
        ddp_init,       0,              0,              0,
        &ddp_usrreqs
index 6a84647..472fc22 100644 (file)
@@ -24,7 +24,7 @@
  * notice must be reproduced on all copies.
  *
  *     @(#) $FreeBSD: src/sys/netatm/atm_proto.c,v 1.3 1999/08/28 00:48:36 peter Exp $
- *     @(#) $DragonFly: src/sys/netproto/atm/atm_proto.c,v 1.11 2006/01/14 13:36:39 swildner Exp $
+ *     @(#) $DragonFly: src/sys/netproto/atm/atm_proto.c,v 1.12 2008/11/01 04:22:15 sephe Exp $
  */
 
 /*
@@ -46,7 +46,8 @@ struct protosw atmsw[] = {
        0,                      /* pr_output */
        0,                      /* pr_ctlinput */
        0,                      /* pr_ctloutput */
-       cpu0_soport,            /* pr_soport */
+       cpu0_soport,            /* pr_mport */
+       NULL,                   /* pr_ctlport */
        0,                      /* pr_init */
        0,                      /* pr_fasttimo */
        0,                      /* pr_slowtimo */
@@ -63,6 +64,7 @@ struct protosw atmsw[] = {
        0,                      /* pr_ctlinput */
        atm_aal5_ctloutput,     /* pr_ctloutput */
        cpu0_soport,            /* pr_mport */
+       NULL,                   /* pr_ctlport */
        0,                      /* pr_init */
        0,                      /* pr_fasttimo */
        0,                      /* pr_slowtimo */
@@ -80,6 +82,7 @@ struct protosw atmsw[] = {
        x,                      /* pr_ctlinput */
        x,                      /* pr_ctloutput */
        0,                      /* pr_mport */
+       NULL,                   /* pr_ctlport */
        0,                      /* pr_init */
        0,                      /* pr_fasttimo */
        0,                      /* pr_slowtimo */
index dfec569..b89ad0d 100644 (file)
@@ -1,5 +1,5 @@
 /*     $FreeBSD: src/sys/netipsec/keysock.c,v 1.3.2.1 2003/01/24 05:11:36 sam Exp $    */
-/*     $DragonFly: src/sys/netproto/ipsec/keysock.c,v 1.18 2008/01/06 16:55:52 swildner Exp $  */
+/*     $DragonFly: src/sys/netproto/ipsec/keysock.c,v 1.19 2008/11/01 04:22:15 sephe Exp $     */
 /*     $KAME: keysock.c,v 1.25 2001/08/13 20:07:41 itojun Exp $        */
 
 /*
@@ -565,7 +565,7 @@ extern struct domain keydomain;
 struct protosw keysw[] = {
 { SOCK_RAW,    &keydomain,     PF_KEY_V2,      PR_ATOMIC|PR_ADDR,
   0,           key_output,     raw_ctlinput,   0,
-  cpu0_soport,
+  cpu0_soport, cpu0_ctlport,
   raw_init,    0,              0,              0,
   &key_usrreqs
 }
index 0b191f4..9cc13c0 100644 (file)
@@ -1,5 +1,5 @@
 /*     $FreeBSD: src/sys/netipsec/xform_ipip.c,v 1.3.2.1 2003/01/24 05:11:36 sam Exp $ */
-/*     $DragonFly: src/sys/netproto/ipsec/xform_ipip.c,v 1.14 2006/12/22 23:57:54 swildner Exp $       */
+/*     $DragonFly: src/sys/netproto/ipsec/xform_ipip.c,v 1.15 2008/11/01 04:22:15 sephe Exp $  */
 /*     $OpenBSD: ip_ipip.c,v 1.25 2002/06/10 18:04:55 itojun Exp $ */
 /*
  * The authors of this code are John Ioannidis (ji@tla.org),
@@ -640,9 +640,8 @@ static struct xformsw ipe4_xformsw = {
 extern struct domain inetdomain;
 static struct protosw ipe4_protosw[] = {
 { SOCK_RAW,    &inetdomain,    IPPROTO_IPV4,   PR_ATOMIC|PR_ADDR|PR_LASTHDR,
-  ip4_input,
-               0,              0,              rip_ctloutput,
-  cpu0_soport,
+  ip4_input,   0,              0,              rip_ctloutput,
+  cpu0_soport, NULL,
   0,           0,              0,              0,
   &rip_usrreqs
 },
index 8d35981..607dcb4 100644 (file)
@@ -34,7 +34,7 @@
  *     @(#)ipx_proto.c
  *
  * $FreeBSD: src/sys/netipx/ipx_proto.c,v 1.15 1999/08/28 00:49:41 peter Exp $
- * $DragonFly: src/sys/netproto/ipx/ipx_proto.c,v 1.7 2006/10/23 09:27:37 swildner Exp $
+ * $DragonFly: src/sys/netproto/ipx/ipx_proto.c,v 1.8 2008/11/01 04:22:15 sephe Exp $
  */
 
 #include "opt_ipx.h"
@@ -63,31 +63,31 @@ static      struct pr_usrreqs nousrreqs;
 static struct protosw ipxsw[] = {
 { 0,           &ipxdomain,     0,              0,
   0,           0,              0,              0,
-  cpu0_soport,
+  cpu0_soport, NULL,
   ipx_init,    0,              0,              0,
   &nousrreqs
 },
 { SOCK_DGRAM,  &ipxdomain,     0,              PR_ATOMIC|PR_ADDR,
   0,           0,              ipx_ctlinput,   ipx_ctloutput,
-  cpu0_soport,
+  cpu0_soport, cpu0_ctlport,
   0,           0,              0,              0,
   &ipx_usrreqs
 },
 { SOCK_STREAM, &ipxdomain,     IPXPROTO_SPX,   PR_CONNREQUIRED|PR_WANTRCVD,
   0,           0,              spx_ctlinput,   spx_ctloutput,
-  cpu0_soport,
+  cpu0_soport, cpu0_ctlport,
   spx_init,    spx_fasttimo,   spx_slowtimo,   0,
   &spx_usrreqs
 },
 { SOCK_SEQPACKET,&ipxdomain,   IPXPROTO_SPX,   PR_CONNREQUIRED|PR_WANTRCVD|PR_ATOMIC,
   0,           0,              spx_ctlinput,   spx_ctloutput,
-  cpu0_soport,
+  cpu0_soport, cpu0_ctlport,
   0,           0,              0,              0,
   &spx_usrreq_sps
 },
 { SOCK_RAW,    &ipxdomain,     IPXPROTO_RAW,   PR_ATOMIC|PR_ADDR,
   0,           0,              0,              ipx_ctloutput,
-  cpu0_soport,
+  cpu0_soport, NULL,
   0,           0,              0,              0,
   &ripx_usrreqs
 },
@@ -95,7 +95,7 @@ static struct protosw ipxsw[] = {
 #if 0
 { SOCK_RAW,    &ipxdomain,     IPPROTO_IPX,    PR_ATOMIC|PR_ADDR,
   iptun_input, rip_output,     iptun_ctlinput, 0,
-  cpu0_soport,
+  cpu0_soport, cpu0_ctlport,
   0,           0,              0,              0,
   &rip_usrreqs
 },
index 73009dc..4e72b7a 100644 (file)
@@ -1,5 +1,5 @@
 /*     $FreeBSD: src/sys/netkey/keysock.c,v 1.1.2.4 2003/01/11 19:10:59 ume Exp $      */
-/*     $DragonFly: src/sys/netproto/key/keysock.c,v 1.20 2008/01/06 16:55:52 swildner Exp $    */
+/*     $DragonFly: src/sys/netproto/key/keysock.c,v 1.21 2008/11/01 04:22:16 sephe Exp $       */
 /*     $KAME: keysock.c,v 1.25 2001/08/13 20:07:41 itojun Exp $        */
 
 /*
@@ -569,7 +569,7 @@ extern struct domain keydomain;
 struct protosw keysw[] = {
 { SOCK_RAW,    &keydomain,     PF_KEY_V2,      PR_ATOMIC|PR_ADDR,
   0,           key_output,     raw_ctlinput,   0,
-  cpu0_soport,
+  cpu0_soport, cpu0_ctlport,
   raw_init,    0,              0,              0,
   &key_usrreqs
 }
index e60fbe9..8729173 100644 (file)
@@ -28,7 +28,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $DragonFly: src/sys/netproto/mpls/mpls_proto.c,v 1.1 2008/07/07 22:02:10 nant Exp $
+ * $DragonFly: src/sys/netproto/mpls/mpls_proto.c,v 1.2 2008/11/01 04:22:16 sephe Exp $
  */
 
 #include <sys/domain.h>
@@ -48,13 +48,13 @@ static struct pr_usrreqs nousrreqs;  /* XXX use this for something */
 struct protosw mplssw[] = {
 { 0,           &mplsdomain,    0,      0,
   0,           0,              0,      0,
-  cpu0_soport,
+  cpu0_soport, NULL,
   mpls_init,   0,              0,      0,
   &nousrreqs
 },
 { SOCK_RAW,    &mplsdomain,    0,      PR_ATOMIC|PR_ADDR,
   0,           0,              0,      0,
-  cpu0_soport,
+  cpu0_soport, NULL,
   0,           0,              0,      0,
   &nousrreqs
 },
index 1b14982..38925df 100644 (file)
@@ -32,7 +32,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/netnatm/natm_proto.c,v 1.4.2.2 2000/08/03 18:56:28 peter Exp $
- * $DragonFly: src/sys/netproto/natm/natm_proto.c,v 1.10 2006/10/23 09:27:37 swildner Exp $
+ * $DragonFly: src/sys/netproto/natm/natm_proto.c,v 1.11 2008/11/01 04:22:16 sephe Exp $
  */
 
 /*
@@ -59,7 +59,7 @@ static struct protosw natmsw[] = {
 { SOCK_STREAM, &natmdomain,    PROTO_NATMAAL5, PR_CONNREQUIRED,
   0,   0,      0,      0,
 #ifdef FREEBSD_USRREQS
-  cpu0_soport,
+  cpu0_soport, NULL,
 #else
   natm_usrreq,
 #endif
@@ -73,7 +73,7 @@ static struct protosw natmsw[] = {
 { SOCK_DGRAM,  &natmdomain,    PROTO_NATMAAL5, PR_CONNREQUIRED | PR_ATOMIC,
   0,   0,      0,      0,
 #ifdef FREEBSD_USRREQS
-  cpu0_soport,
+  cpu0_soport, NULL,
 #else
   natm_usrreq,
 #endif
@@ -87,7 +87,7 @@ static struct protosw natmsw[] = {
 { SOCK_STREAM, &natmdomain,    PROTO_NATMAAL0, PR_CONNREQUIRED,
   0,   0,      0,      0,
 #ifdef FREEBSD_USRREQS
-  cpu0_soport,
+  cpu0_soport, NULL,
 #else
   natm_usrreq,
 #endif
index 0fcb6df..088c79d 100644 (file)
@@ -32,7 +32,7 @@
  *
  *     From: @(#)ns_proto.c    8.1 (Berkeley) 6/10/93
  * $FreeBSD: src/sys/netns/ns_proto.c,v 1.10 1999/08/28 00:49:51 peter Exp $
- * $DragonFly: src/sys/netproto/ns/ns_proto.c,v 1.7 2005/03/04 02:21:49 hsu Exp $
+ * $DragonFly: src/sys/netproto/ns/ns_proto.c,v 1.8 2008/11/01 04:22:16 sephe Exp $
  */
 
 #include <sys/param.h>
@@ -61,37 +61,37 @@ static  struct pr_usrreqs nousrreqs;
 struct protosw nssw[] = {
 { 0,           &nsdomain,      0,              0,
   0,           idp_output,     0,              0,
-  cpu0_soport,
+  cpu0_soport, NULL,
   ns_init,     0,              0,              0,
   &nousrreqs
 },
 { SOCK_DGRAM,  &nsdomain,      0,              PR_ATOMIC|PR_ADDR,
   0,           0,              idp_ctlinput,   idp_ctloutput,
-  cpu0_soport,
+  cpu0_soport, cpu0_ctlport,
   0,           0,              0,              0,
   &idp_usrreqs
 },
 { SOCK_STREAM, &nsdomain,      NSPROTO_SPP,    PR_CONNREQUIRED|PR_WANTRCVD,
   spp_input,   0,              spp_ctlinput,   spp_ctloutput,
-  cpu0_soport,
+  cpu0_soport, cpu0_ctlport,
   spp_init,    spp_fasttimo,   spp_slowtimo,   0,
   &spp_usrreqs
 },
 { SOCK_SEQPACKET,&nsdomain,    NSPROTO_SPP,    PR_CONNREQUIRED|PR_WANTRCVD|PR_ATOMIC,
   spp_input,   0,              spp_ctlinput,   spp_ctloutput,
-  cpu0_soport,
+  cpu0_soport, cpu0_ctlport,
   0,           0,              0,              0,
   &spp_usrreqs_sp
 },
 { SOCK_RAW,    &nsdomain,      NSPROTO_RAW,    PR_ATOMIC|PR_ADDR,
   idp_input,   idp_output,     0,              idp_ctloutput,
-  cpu0_soport,
+  cpu0_soport, NULL,
   0,           0,              0,              0,
   &idp_raw_usrreqs
 },
 { SOCK_RAW,    &nsdomain,      NSPROTO_ERROR,  PR_ATOMIC|PR_ADDR,
   idp_ctlinput,        idp_output,     0,              idp_ctloutput,
-  cpu0_soport,
+  cpu0_soport, NULL,
   0,           0,              0,              0,
   &idp_raw_usrreqs
 }