Module Name: src Committed By: roy Date: Tue Oct 19 20:01:09 UTC 2021
Modified Files: src/sys/netinet: in_pcb.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.185 -r1.186 src/sys/netinet/in_pcb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/netinet/in_pcb.c diff -u src/sys/netinet/in_pcb.c:1.185 src/sys/netinet/in_pcb.c:1.186 --- src/sys/netinet/in_pcb.c:1.185 Tue Sep 8 14:12:57 2020 +++ src/sys/netinet/in_pcb.c Tue Oct 19 20:01:09 2021 @@ -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 * 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);