summaryrefslogtreecommitdiff
path: root/sys/netinet6
diff options
context:
space:
mode:
authorVincent Gross <vgross@cvs.openbsd.org>2016-04-05 21:21:42 +0000
committerVincent Gross <vgross@cvs.openbsd.org>2016-04-05 21:21:42 +0000
commit3d9fed1b7991ee8422f9d41fba720c8d2706791a (patch)
tree0b3ba33f0a85adaf617383018c0c092aa7a747d3 /sys/netinet6
parent0118c14dc1ea4ba6cf13363e7d2c3cdb7e9aa047 (diff)
Move reserved port checks from in(6)_pcbaddrisavail() to in_pcbbind().
Kill old comments while at it. Ok mpi@ bluhm@
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/in6_pcb.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c
index 4fde2100475..1ffdd1d4c84 100644
--- a/sys/netinet6/in6_pcb.c
+++ b/sys/netinet6/in6_pcb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6_pcb.c,v 1.90 2016/03/30 13:02:22 vgross Exp $ */
+/* $OpenBSD: in6_pcb.c,v 1.91 2016/04/05 21:21:41 vgross Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -158,7 +158,6 @@ in6_pcbaddrisavail(struct inpcb *inp, struct sockaddr_in6 *sin6, int wild,
struct inpcbtable *table = inp->inp_table;
u_short lport = sin6->sin6_port;
int reuseport = (so->so_options & SO_REUSEPORT);
- int error;
wild |= INPLOOKUP_IPV6;
/* KAME hack: embed scopeid */
@@ -217,17 +216,6 @@ in6_pcbaddrisavail(struct inpcb *inp, struct sockaddr_in6 *sin6, int wild,
if (lport) {
struct inpcb *t;
- /*
- * Question: Do we wish to continue the Berkeley
- * tradition of ports < IPPORT_RESERVED be only for
- * root?
- * Answer: For now yes, but IMHO, it should be REMOVED!
- * OUCH: One other thing, is there no better way of
- * finding a process for a socket instead of using
- * curproc? (Marked with BSD's {in,}famous XXX ?
- */
- if (ntohs(lport) < IPPORT_RESERVED && (error = suser(p, 0)))
- return error;
if (so->so_euid) {
t = in_pcblookup(table,
(struct in_addr *)&zeroin6_addr, 0,