summaryrefslogtreecommitdiff
path: root/sys/netinet6
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2008-08-02 18:32:22 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2008-08-02 18:32:22 +0000
commitb4b08c816ad8863bd5808776c971605b32268d66 (patch)
tree5e50c6eea12eb53579ac29dfc29ddd5c9a3eb8c3 /sys/netinet6
parentc9576930851c42d28d7d59ba428028ceba01b29b (diff)
Notes
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/in6_pcb.c12
-rw-r--r--sys/netinet6/in6_pcb.h3
-rw-r--r--sys/netinet6/in6_src.c6
3 files changed, 11 insertions, 10 deletions
diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c
index f95292d95ca5..a00f7c688d35 100644
--- a/sys/netinet6/in6_pcb.c
+++ b/sys/netinet6/in6_pcb.c
@@ -188,7 +188,7 @@ in6_pcbbind(register struct inpcb *inp, struct sockaddr *nam,
PRIV_NETINET_REUSEPORT, 0) != 0) {
t = in6_pcblookup_local(pcbinfo,
&sin6->sin6_addr, lport,
- INPLOOKUP_WILDCARD);
+ INPLOOKUP_WILDCARD, cred);
if (t &&
((t->inp_vflag & INP_TIMEWAIT) == 0) &&
(so->so_type != SOCK_STREAM ||
@@ -205,8 +205,8 @@ in6_pcbbind(register struct inpcb *inp, struct sockaddr *nam,
in6_sin6_2_sin(&sin, sin6);
t = in_pcblookup_local(pcbinfo,
- sin.sin_addr, lport,
- INPLOOKUP_WILDCARD);
+ sin.sin_addr, lport,
+ INPLOOKUP_WILDCARD, cred);
if (t &&
((t->inp_vflag &
INP_TIMEWAIT) == 0) &&
@@ -219,7 +219,7 @@ in6_pcbbind(register struct inpcb *inp, struct sockaddr *nam,
}
}
t = in6_pcblookup_local(pcbinfo, &sin6->sin6_addr,
- lport, wild);
+ lport, wild, cred);
if (t && (reuseport & ((t->inp_vflag & INP_TIMEWAIT) ?
intotw(t)->tw_so_options :
t->inp_socket->so_options)) == 0)
@@ -230,7 +230,7 @@ in6_pcbbind(register struct inpcb *inp, struct sockaddr *nam,
in6_sin6_2_sin(&sin, sin6);
t = in_pcblookup_local(pcbinfo, sin.sin_addr,
- lport, wild);
+ lport, wild, cred);
if (t && t->inp_vflag & INP_TIMEWAIT) {
if ((reuseport &
intotw(t)->tw_so_options) == 0 &&
@@ -673,7 +673,7 @@ in6_pcbnotify(struct inpcbinfo *pcbinfo, struct sockaddr *dst,
*/
struct inpcb *
in6_pcblookup_local(struct inpcbinfo *pcbinfo, struct in6_addr *laddr,
- u_short lport, int wild_okay)
+ u_short lport, int wild_okay, struct ucred *cred)
{
register struct inpcb *inp;
int matchwild = 3, wildcard;
diff --git a/sys/netinet6/in6_pcb.h b/sys/netinet6/in6_pcb.h
index 8780cb0137e8..9a3f986a5f5e 100644
--- a/sys/netinet6/in6_pcb.h
+++ b/sys/netinet6/in6_pcb.h
@@ -81,7 +81,8 @@ int in6_pcbladdr __P((struct inpcb *, struct sockaddr *,
struct in6_addr **));
struct inpcb *
in6_pcblookup_local __P((struct inpcbinfo *,
- struct in6_addr *, u_short, int));
+ struct in6_addr *, u_short, int,
+ struct ucred *));
struct inpcb *
in6_pcblookup_hash __P((struct inpcbinfo *,
struct in6_addr *, u_int, struct in6_addr *,
diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c
index 651ed9df2187..b2628498b3f4 100644
--- a/sys/netinet6/in6_src.c
+++ b/sys/netinet6/in6_src.c
@@ -812,7 +812,7 @@ in6_pcbsetport(struct in6_addr *laddr, struct inpcb *inp, struct ucred *cred)
*lastport = first;
lport = htons(*lastport);
} while (in6_pcblookup_local(pcbinfo, &inp->in6p_laddr,
- lport, wild));
+ lport, wild, cred));
} else {
/*
* counting up
@@ -832,8 +832,8 @@ in6_pcbsetport(struct in6_addr *laddr, struct inpcb *inp, struct ucred *cred)
if (*lastport < first || *lastport > last)
*lastport = first;
lport = htons(*lastport);
- } while (in6_pcblookup_local(pcbinfo,
- &inp->in6p_laddr, lport, wild));
+ } while (in6_pcblookup_local(pcbinfo, &inp->in6p_laddr,
+ lport, wild, cred));
}
inp->inp_lport = lport;