summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2009-01-09 17:16:18 +0000
committeradrian <adrian@FreeBSD.org>2009-01-09 17:16:18 +0000
commit3d9557d3bdde3372b623cbfc1d955d5a9e458882 (patch)
tree8f363a84a3e00351778235de7f646b8151424906
parent8e46243b4cd176e63f5171c858f5c8029a83f27b (diff)
downloadFreeBSD-src-3d9557d3bdde3372b623cbfc1d955d5a9e458882.zip
FreeBSD-src-3d9557d3bdde3372b623cbfc1d955d5a9e458882.tar.gz
Comment some potentially confusing logic.
Nitpicking by: mlaier MFC after: 2 weeks
-rw-r--r--sys/netinet/in_pcb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index d42d109..a5ea737 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -347,6 +347,11 @@ in_pcbbind_setup(struct inpcb *inp, struct sockaddr *nam, in_addr_t *laddrp,
} else if (sin->sin_addr.s_addr != INADDR_ANY) {
sin->sin_port = 0; /* yech... */
bzero(&sin->sin_zero, sizeof(sin->sin_zero));
+ /*
+ * Is the address a local IP address?
+ * If INP_NONLOCALOK is set, then the socket may be bound
+ * to any local endpoint address.
+ */
if (
#if defined(IP_NONLOCALBIND)
((inp->inp_flags & INP_NONLOCALOK) == 0) &&
OpenPOWER on IntegriCloud