diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index d42d109c7910..a5ea737fb2a1 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) &&