Hi,
any reason this list does not send a proper reply-to-list?
David Sommerseth wrote:
One is that you do resolve the IP address based on the device name. What if
the IP address changes on that device? It would be anticipated by most users
that it would then listen to the new IP address. When being done via the
command line, it is much more obvious OpenVPN needs to be restarted on an IP
address change.
You do not want to get into supporting changing addresses, really.
While libnl would work for linux, but that does not cover bsds or
anything else.
In fact, I wonder if it is even possible to
assign multiple IPv4 addresses using iproute2 to a device without aliases. It
might be something similar in *BSD as well. Your patch does not cover this
scenario at all.
This is possible, one can have more than one IPv4 address per interface
on linux using iproute2 easily.
To do this properly ...
Either use SO_BINDTODEVICE, which is not portable again, or getifaddrs()
to gather the addresses for the interface and multi-listen the daemon -
which is not implemented.
Neither getifaddrs nor SO_BINDTODEVICE are 100% portable, so there is no
real proper way, nevertheless getifaddrs would be my choice.
So besides from all mentioned points, even the approach to get the
address is wrong.
Markus