Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Apr 2002 15:17:31 -0800 (PST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 9151 for review
Message-ID:  <200204052317.g35NHVJ19149@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=9151

Change 9151 by jhb@jhb_laptop on 2002/04/05 15:16:36

	Change prison_xinpcb() to take a thread as the first
	argument and use td_ucred appropriately.

Affected files ...

... //depot/projects/smpng/sys/netinet/in_pcb.c#22 integrate
... //depot/projects/smpng/sys/netinet/in_pcb.h#9 integrate
... //depot/projects/smpng/sys/netinet/ip_divert.c#12 integrate

Differences ...

==== //depot/projects/smpng/sys/netinet/in_pcb.c#22 (text+ko) ====

@@ -1031,11 +1031,11 @@
 }
 
 int
-prison_xinpcb(struct proc *p, struct inpcb *inp)
+prison_xinpcb(struct thread *td, struct inpcb *inp)
 {
-	if (!jailed(p->p_ucred))
+	if (!jailed(td->td_ucred))
 		return (0);
-	if (ntohl(inp->inp_laddr.s_addr) == prison_getip(p->p_ucred))
+	if (ntohl(inp->inp_laddr.s_addr) == prison_getip(td->td_ucred))
 		return (0);
 	return (1);
 }

==== //depot/projects/smpng/sys/netinet/in_pcb.h#9 (text+ko) ====

@@ -329,7 +329,7 @@
 int	in_setpeeraddr(struct socket *so, struct sockaddr **nam);
 int	in_setsockaddr(struct socket *so, struct sockaddr **nam);
 void	in_pcbremlists(struct inpcb *inp);
-int	prison_xinpcb(struct proc *p, struct inpcb *inp);
+int	prison_xinpcb(struct thread *td, struct inpcb *inp);
 #endif /* _KERNEL */
 
 #endif /* !_NETINET_IN_PCB_H_ */

==== //depot/projects/smpng/sys/netinet/ip_divert.c#12 (text+ko) ====

@@ -487,8 +487,7 @@
 	s = splnet();
 	for (inp = LIST_FIRST(divcbinfo.listhead), i = 0; inp && i < n;
 	     inp = LIST_NEXT(inp, inp_list)) {
-		if (inp->inp_gencnt <= gencnt && !prison_xinpcb(
-		    req->td->td_proc, inp))
+		if (inp->inp_gencnt <= gencnt && !prison_xinpcb(req->td, inp))
 			inp_list[i++] = inp;
 	}
 	splx(s);

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204052317.g35NHVJ19149>