diff options
| author | roy <roy@NetBSD.org> | 2021-10-19 20:01:09 +0000 |
|---|---|---|
| committer | roy <roy@NetBSD.org> | 2021-10-19 20:01:09 +0000 |
| commit | f8f50bb72e5ea42d477b661dca152e9d64163a5c (patch) | |
| tree | b7ae30de00d4fc86428cc93233f1d2cc4acded18 /sys/netinet | |
| parent | 5c2f1fffff411ebe59312d4521013dfea6df4675 (diff) | |
netinet: Allow binding the unspecified address when no addresses exist
You should always be able to bind to the unspecified address even if
no addresses have been configured on any interface.
For example, a DHCP client could be started before the loopback interface
has been fully configured.
Diffstat (limited to 'sys/netinet')
| -rw-r--r-- | sys/netinet/in_pcb.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index c44686352d3..a3e0b87c311 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -1,4 +1,4 @@ -/* $NetBSD: in_pcb.c,v 1.185 2020/09/08 14:12:57 christos Exp $ */ +/* $NetBSD: in_pcb.c,v 1.186 2021/10/19 20:01:09 roy Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -93,7 +93,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: in_pcb.c,v 1.185 2020/09/08 14:12:57 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in_pcb.c,v 1.186 2021/10/19 20:01:09 roy Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -436,8 +436,6 @@ in_pcbbind(void *v, struct sockaddr_in *sin, struct lwp *l) if (inp->inp_af != AF_INET) return (EINVAL); - if (IN_ADDRLIST_READER_EMPTY()) - return (EADDRNOTAVAIL); if (inp->inp_lport || !in_nullhost(inp->inp_laddr)) return (EINVAL); |
