freebsd-dev/sys/netinet6
Roy Marples 5c5340108e net: Allow binding of unspecified address without address existance
Previously in_pcbbind_setup returned EADDRNOTAVAIL for empty
V_in_ifaddrhead (i.e., no IPv4 addresses configured) and in6_pcbbind
did the same for empty V_in6_ifaddrhead (no IPv6 addresses).

An equivalent test has existed since 4.4-Lite.  It was presumably done
to avoid extra work (assuming the address isn't going to be found
later).

In normal system operation *_ifaddrhead will not be empty: they will
at least have the loopback address(es).  In practice no work will be
avoided.

Further, this case caused net/dhcpd to fail when run early in boot
before assignment of any addresses.  It should be possible to bind the
unspecified address even if no addresses have been configured yet, so
just remove the tests.

The now-removed "XXX broken" comments were added in 59562606b9,
which converted the ifaddr lists to TAILQs.  As far as I (emaste) can
tell the brokenness is the issue described above, not some aspect of
the TAILQ conversion.

PR:		253166
Reviewed by:	ae, bz, donner, emaste, glebius
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D32563
2021-10-20 19:25:51 -04:00
..
dest6.c
frag6.c frag6: do less work in frag6_slowtimo if possible 2021-08-14 18:51:00 +02:00
icmp6.c lltable: Add support for "child" LLEs holding encap for IPv4oIPv6 entries. 2021-08-21 17:34:35 +00:00
icmp6.h
in6_cksum.c
in6_fib_algo.c
in6_fib.c
in6_fib.h
in6_gif.c
in6_ifattach.c nd6: Mark several callouts as MPSAFE 2021-08-09 13:27:52 -04:00
in6_ifattach.h
in6_jail.c
in6_mcast.c Fix panic in IPv6 multicast code. 2021-08-06 12:57:59 +03:00
in6_pcb.c net: Allow binding of unspecified address without address existance 2021-10-20 19:25:51 -04:00
in6_pcb.h
in6_pcbgroup.c
in6_proto.c inet6(4): add a missing IPPROTO_ETHERIP entry 2021-08-27 17:14:35 +09:00
in6_rmx.c
in6_rss.c
in6_rss.h
in6_src.c Move in6_pcbsetport() to in6_pcb.c 2021-10-18 10:19:03 -07:00
in6_var.h
in6.c lltable: fix crash introduced in c541bd368f. 2021-08-22 08:49:18 +00:00
in6.h
ip6_ecn.h
ip6_fastfwd.c
ip6_forward.c
ip6_gre.c
ip6_id.c
ip6_input.c
ip6_mroute.c ip6mrouter: Make the expiration callout MPSAFE 2021-09-07 11:19:29 -04:00
ip6_mroute.h
ip6_output.c ipv6: Fix getsockopt() for some IPPROTO_IPV6 level socket options 2021-08-09 09:29:13 +02:00
ip6_var.h
ip6.h
ip6protosw.h
ip_fw_nat64.h
ip_fw_nptv6.h
mld6_var.h
mld6.c
mld6.h
nd6_nbr.c nd6: Make the DAD callout MPSAFE 2021-09-07 11:19:29 -04:00
nd6_rtr.c lltable: fix crash introduced in c541bd368f. 2021-08-22 08:49:18 +00:00
nd6.c inet6(4): Fix a few common typos in source code comments 2021-08-28 18:53:59 +02:00
nd6.h lltable: Add support for "child" LLEs holding encap for IPv4oIPv6 entries. 2021-08-21 17:34:35 +00:00
pim6_var.h
pim6.h
raw_ip6.c
raw_ip6.h
route6.c
scope6_var.h
scope6.c
sctp6_usrreq.c sctp: Tighten up locking around sctp_aloc_assoc() 2021-09-11 10:15:21 -04:00
sctp6_var.h
send.c
send.h
tcp6_var.h
udp6_usrreq.c
udp6_var.h