NetBSD Problem Report #18073

Received: (qmail 242 invoked by uid 605); 26 Aug 2002 11:23:25 -0000
Message-Id: <20020826111610.E749C6930@capybara.yamanet>
Date: Mon, 26 Aug 2002 20:16:10 +0900 (JST)
From: yamt@mwd.biglobe.ne.jp
Sender: gnats-bugs-owner@netbsd.org
Reply-To: yamt@mwd.biglobe.ne.jp
To: gnats-bugs@gnats.netbsd.org
Subject: nfs reconnect hang up with tcp6
X-Send-Pr-Version: 3.95

>Number:         18073
>Category:       kern
>Synopsis:       nfs reconnect hang up with tcp6
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    itojun
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 26 11:24:00 +0000 2002
>Closed-Date:    Tue Aug 27 09:36:23 +0000 2002
>Last-Modified:  Tue Aug 27 09:36:23 +0000 2002
>Originator:     YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
>Release:        NetBSD 1.6F
>Organization:
>Environment:


System: NetBSD capybara 1.6F NetBSD 1.6F (build.stg) #: Mon Aug 26 18:32:33 JST 2002 takashi@capybara:/usr/home/takashi/work/kernel/build.stg i386
Architecture: i386
Machine: i386
>Description:
	in6_pcbsetport should take proc pointer.
	otherwise, nfs_reconnect sucks unless the process is superuser.
>How-To-Repeat:
>Fix:
Index: in6_pcb.c
===================================================================
RCS file: /cvs/cvsroot/syssrc/sys/netinet6/in6_pcb.c,v
retrieving revision 1.49
diff -u -p -r1.49 in6_pcb.c
--- in6_pcb.c	2002/06/11 19:40:00	1.49
+++ in6_pcb.c	2002/08/26 10:39:58
@@ -276,7 +276,7 @@ in6_pcbbind(in6p, nam, p)

 	if (lport == 0) {
 		int e;
-		if ((e = in6_pcbsetport(&in6p->in6p_laddr, in6p)) != 0)
+		if ((e = in6_pcbsetport(&in6p->in6p_laddr, in6p, p)) != 0)
 			return(e);
 	}
 	else
Index: in6_pcb.h
===================================================================
RCS file: /cvs/cvsroot/syssrc/sys/netinet6/in6_pcb.h,v
retrieving revision 1.20
diff -u -p -r1.20 in6_pcb.h
--- in6_pcb.h	2002/06/08 21:22:31	1.20
+++ in6_pcb.h	2002/08/26 10:39:58
@@ -177,7 +177,7 @@ void	in6_setsockaddr __P((struct in6pcb 

 /* in in6_src.c */
 int	in6_selecthlim __P((struct in6pcb *, struct ifnet *));
-int	in6_pcbsetport __P((struct in6_addr *, struct in6pcb *));
+int	in6_pcbsetport __P((struct in6_addr *, struct in6pcb *, struct proc *));

 extern struct rtentry *
 	in6_pcbrtentry __P((struct in6pcb *));
Index: in6_src.c
===================================================================
RCS file: /cvs/cvsroot/syssrc/sys/netinet6/in6_src.c,v
retrieving revision 1.13
diff -u -p -r1.13 in6_src.c
--- in6_src.c	2002/06/08 20:06:44	1.13
+++ in6_src.c	2002/08/26 10:39:58
@@ -335,9 +335,10 @@ in6_selecthlim(in6p, ifp)
  * Find an empty port and set it to the specified PCB.
  */
 int
-in6_pcbsetport(laddr, in6p)
+in6_pcbsetport(laddr, in6p, p)
 	struct in6_addr *laddr;
 	struct in6pcb *in6p;
+	struct proc *p;
 {
 	struct socket *so = in6p->in6p_socket;
 	struct in6pcb *head = in6p->in6p_head;
@@ -354,8 +355,6 @@ in6_pcbsetport(laddr, in6p)

 	if (in6p->in6p_flags & IN6P_LOWPORT) {
 #ifndef IPNOPRIVPORTS
-		struct proc *p = curproc;		/* XXX */
-
 		if (p == 0 || (suser(p->p_ucred, &p->p_acflag) != 0))
 			return (EACCES);
 #endif
Index: udp6_output.c
===================================================================
RCS file: /cvs/cvsroot/syssrc/sys/netinet6/udp6_output.c,v
retrieving revision 1.8
diff -u -p -r1.8 udp6_output.c
--- udp6_output.c	2002/08/14 00:23:40	1.8
+++ udp6_output.c	2002/08/26 10:39:58
@@ -269,7 +269,7 @@ udp6_output(in6p, m, addr6, control, p)
 			goto release;
 		}
 		if (in6p->in6p_lport == 0 &&
-		    (error = in6_pcbsetport(laddr, in6p)) != 0)
+		    (error = in6_pcbsetport(laddr, in6p, p)) != 0)
 			goto release;
 	} else {
 		if (IN6_IS_ADDR_UNSPECIFIED(&in6p->in6p_faddr)) {
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: itojun 
State-Changed-When: Mon Aug 26 07:31:12 PDT 2002 
State-Changed-Why:  
fixed main trunk, pullup req sent to 1.6 


Responsible-Changed-From-To: kern-bug-people->itojun 
Responsible-Changed-By: itojun 
Responsible-Changed-When: Mon Aug 26 07:31:12 PDT 2002 
Responsible-Changed-Why:  
mine 
State-Changed-From-To: feedback->closed 
State-Changed-By: itojun 
State-Changed-When: Tue Aug 27 02:36:15 PDT 2002 
State-Changed-Why:  
pulled up to 1.6 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.