diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index e3c2fb23a940..aa27cb175cb3 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -1,4 +1,4 @@ -/* $NetBSD: in6_pcb.c,v 1.50 2002/08/20 22:06:04 itojun Exp $ */ +/* $NetBSD: in6_pcb.c,v 1.51 2002/08/26 14:25:00 itojun Exp $ */ /* $KAME: in6_pcb.c,v 1.84 2001/02/08 18:02:08 itojun Exp $ */ /* @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in6_pcb.c,v 1.50 2002/08/20 22:06:04 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in6_pcb.c,v 1.51 2002/08/26 14:25:00 itojun Exp $"); #include "opt_ipsec.h" @@ -282,7 +282,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 diff --git a/sys/netinet6/in6_pcb.h b/sys/netinet6/in6_pcb.h index dfd2c7b394be..c68f50aea100 100644 --- a/sys/netinet6/in6_pcb.h +++ b/sys/netinet6/in6_pcb.h @@ -1,4 +1,4 @@ -/* $NetBSD: in6_pcb.h,v 1.20 2002/06/08 21:22:31 itojun Exp $ */ +/* $NetBSD: in6_pcb.h,v 1.21 2002/08/26 14:25:00 itojun Exp $ */ /* $KAME: in6_pcb.h,v 1.45 2001/02/09 05:59:46 itojun Exp $ */ /* @@ -177,7 +177,7 @@ void in6_setsockaddr __P((struct in6pcb *, struct mbuf *)); /* 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 *)); diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c index 3b14553d4ae0..1f596bdb2567 100644 --- a/sys/netinet6/in6_src.c +++ b/sys/netinet6/in6_src.c @@ -1,4 +1,4 @@ -/* $NetBSD: in6_src.c,v 1.13 2002/06/08 20:06:44 itojun Exp $ */ +/* $NetBSD: in6_src.c,v 1.14 2002/08/26 14:25:01 itojun Exp $ */ /* $KAME: in6_src.c,v 1.36 2001/02/06 04:08:17 itojun Exp $ */ /* @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in6_src.c,v 1.13 2002/06/08 20:06:44 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in6_src.c,v 1.14 2002/08/26 14:25:01 itojun Exp $"); #include "opt_inet.h" @@ -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 diff --git a/sys/netinet6/udp6_output.c b/sys/netinet6/udp6_output.c index 040685852931..d2b5e05381c5 100644 --- a/sys/netinet6/udp6_output.c +++ b/sys/netinet6/udp6_output.c @@ -1,4 +1,4 @@ -/* $NetBSD: udp6_output.c,v 1.8 2002/08/14 00:23:40 itojun Exp $ */ +/* $NetBSD: udp6_output.c,v 1.9 2002/08/26 14:25:01 itojun Exp $ */ /* $KAME: udp6_output.c,v 1.43 2001/10/15 09:19:52 itojun Exp $ */ /* @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: udp6_output.c,v 1.8 2002/08/14 00:23:40 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udp6_output.c,v 1.9 2002/08/26 14:25:01 itojun Exp $"); #include "opt_ipsec.h" #include "opt_inet.h" @@ -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)) {