Sat Apr 25 14:56:05 2015 UTC ()
fix missed parameter type change in dccp6_accept() to sockaddr * from mbuf *


(rtr)
diff -r1.3 -r1.4 src/sys/netinet6/dccp6_usrreq.c
diff -r1.2 -r1.3 src/sys/netinet6/dccp6_var.h

cvs diff -r1.3 -r1.4 src/sys/netinet6/dccp6_usrreq.c (expand / switch to unified diff)

--- src/sys/netinet6/dccp6_usrreq.c 2015/04/24 22:32:37 1.3
+++ src/sys/netinet6/dccp6_usrreq.c 2015/04/25 14:56:05 1.4
@@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
1/* $KAME: dccp6_usrreq.c,v 1.13 2005/07/27 08:42:56 nishida Exp $ */ 1/* $KAME: dccp6_usrreq.c,v 1.13 2005/07/27 08:42:56 nishida Exp $ */
2/* $NetBSD: dccp6_usrreq.c,v 1.3 2015/04/24 22:32:37 rtr Exp $ */ 2/* $NetBSD: dccp6_usrreq.c,v 1.4 2015/04/25 14:56:05 rtr Exp $ */
3 3
4/* 4/*
5 * Copyright (C) 2003 WIDE Project. 5 * Copyright (C) 2003 WIDE Project.
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer. 12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution. 15 * documentation and/or other materials provided with the distribution.
@@ -21,27 +21,27 @@ @@ -21,27 +21,27 @@
21 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE 23 * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE. 30 * SUCH DAMAGE.
31 */ 31 */
32 32
33#include <sys/cdefs.h> 33#include <sys/cdefs.h>
34__KERNEL_RCSID(0, "$NetBSD: dccp6_usrreq.c,v 1.3 2015/04/24 22:32:37 rtr Exp $"); 34__KERNEL_RCSID(0, "$NetBSD: dccp6_usrreq.c,v 1.4 2015/04/25 14:56:05 rtr Exp $");
35 35
36#include "opt_inet.h" 36#include "opt_inet.h"
37#include "opt_dccp.h" 37#include "opt_dccp.h"
38 38
39#include <sys/param.h> 39#include <sys/param.h>
40#include <sys/systm.h> 40#include <sys/systm.h>
41#include <sys/domain.h> 41#include <sys/domain.h>
42#include <sys/kernel.h> 42#include <sys/kernel.h>
43#include <sys/pool.h> 43#include <sys/pool.h>
44#include <sys/lock.h> 44#include <sys/lock.h>
45#include <sys/malloc.h> 45#include <sys/malloc.h>
46#include <sys/mbuf.h> 46#include <sys/mbuf.h>
47#include <sys/proc.h> 47#include <sys/proc.h>
@@ -258,27 +258,27 @@ dccp6_listen(struct socket *so, struct l @@ -258,27 +258,27 @@ dccp6_listen(struct socket *so, struct l
258 dp->seq_snd = 512; 258 dp->seq_snd = 512;
259 } 259 }
260 INP_UNLOCK(inp); 260 INP_UNLOCK(inp);
261 return error; 261 return error;
262} 262}
263 263
264int 264int
265dccp6_accept(struct socket *so, struct sockaddr *nam) 265dccp6_accept(struct socket *so, struct sockaddr *nam)
266{ 266{
267 struct in6pcb *in6p = NULL; 267 struct in6pcb *in6p = NULL;
268 int error = 0; 268 int error = 0;
269 269
270 DCCP_DEBUG((LOG_INFO, "Entering dccp6_accept!\n")); 270 DCCP_DEBUG((LOG_INFO, "Entering dccp6_accept!\n"));
271 if (m == NULL) { 271 if (nam == NULL) {
272 return EINVAL; 272 return EINVAL;
273 } 273 }
274 if (so->so_state & SS_ISDISCONNECTED) { 274 if (so->so_state & SS_ISDISCONNECTED) {
275 DCCP_DEBUG((LOG_INFO, "so_state && SS_ISDISCONNECTED!, so->state = %i\n", so->so_state)); 275 DCCP_DEBUG((LOG_INFO, "so_state && SS_ISDISCONNECTED!, so->state = %i\n", so->so_state));
276 return ECONNABORTED; 276 return ECONNABORTED;
277 } 277 }
278 278
279 INP_INFO_RLOCK(&dccpbinfo); 279 INP_INFO_RLOCK(&dccpbinfo);
280 in6p = sotoin6pcb(so); 280 in6p = sotoin6pcb(so);
281 if (in6p == 0) { 281 if (in6p == 0) {
282 INP_INFO_RUNLOCK(&dccpbinfo); 282 INP_INFO_RUNLOCK(&dccpbinfo);
283 return EINVAL; 283 return EINVAL;
284 } 284 }

cvs diff -r1.2 -r1.3 src/sys/netinet6/dccp6_var.h (expand / switch to unified diff)

--- src/sys/netinet6/dccp6_var.h 2015/04/04 04:33:39 1.2
+++ src/sys/netinet6/dccp6_var.h 2015/04/25 14:56:05 1.3
@@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
1/* $KAME: dccp6_var.h,v 1.3 2003/11/18 04:55:43 ono Exp $ */ 1/* $KAME: dccp6_var.h,v 1.3 2003/11/18 04:55:43 ono Exp $ */
2/* $NetBSD: dccp6_var.h,v 1.2 2015/04/04 04:33:39 rtr Exp $ */ 2/* $NetBSD: dccp6_var.h,v 1.3 2015/04/25 14:56:05 rtr Exp $ */
3 3
4/* 4/*
5 * Copyright (c) 2003 Joacim Häggmark 5 * Copyright (c) 2003 Joacim Häggmark
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
11 * 11 *
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the 15 * notice, this list of conditions and the following disclaimer in the
@@ -36,17 +36,17 @@ @@ -36,17 +36,17 @@
36 36
37#ifdef _KERNEL 37#ifdef _KERNEL
38 38
39extern const struct pr_usrreqs dccp6_usrreqs; 39extern const struct pr_usrreqs dccp6_usrreqs;
40extern struct in6pcb dccpb6; 40extern struct in6pcb dccpb6;
41 41
42void * dccp6_ctlinput(int, const struct sockaddr *, void *); 42void * dccp6_ctlinput(int, const struct sockaddr *, void *);
43int dccp6_input(struct mbuf **, int *, int); 43int dccp6_input(struct mbuf **, int *, int);
44int dccp6_usrreq(struct socket *, int, struct mbuf *, struct mbuf *, 44int dccp6_usrreq(struct socket *, int, struct mbuf *, struct mbuf *,
45 struct mbuf *, struct lwp *); 45 struct mbuf *, struct lwp *);
46int dccp6_bind(struct socket *, struct sockaddr *, struct lwp *); 46int dccp6_bind(struct socket *, struct sockaddr *, struct lwp *);
47int dccp6_listen(struct socket *, struct lwp *); 47int dccp6_listen(struct socket *, struct lwp *);
48int dccp6_connect(struct socket *, struct mbuf *, struct lwp *); 48int dccp6_connect(struct socket *, struct mbuf *, struct lwp *);
49int dccp6_accept(struct socket *, struct mbuf *); 49int dccp6_accept(struct socket *, struct sockaddr *);
50 50
51#endif 51#endif
52#endif 52#endif