Skip Menu |
 

Subject: Add IP_RECVDSTADDR/IP_SENDSRCADDR support to net-server.c
Most common platforms now support IP_PKTINFO (Linux, Solaris, NetBSD, OS
X, Windows), but FreeBSD only supports a variant using IP_RECVDSTADDR and
IP_SENDSRCADDR. We should support this variant since we have decided to
remove the bind-to-all-interfaces workaround.

OpenBSD (and I think old versions of OS X) define IP_RECVDSTADDR but not
IP_SENDSRCADDR. It's conceivable that IP_RECVDSTADDR can be used to
specify a UDP source address (IP_SENDSRCADDR has the same integer value
as IP_RECVDSTADDR on FreeBSD), but we would need to test it. If that
doesn't work, OpenBSD by itself isn't sufficient reason to keep
supporting the workaround of binding to all interfaces. But if it does
work it would be nice to support it.