TT#86850 support DNS lookup for advertised address

closes #969

Change-Id: I3712a0977700719765bbd45985306e598067c0af
changes/29/41929/2
Richard Fuchs 5 years ago
parent 2369ef529e
commit e65b01d5ab

@ -276,8 +276,13 @@ static int if_addr_parse(GQueue *q, char *s, struct ifaddrs *ifas) {
ZERO(adv);
if (c) {
if (sockaddr_parse_any(&adv, c))
if (sockaddr_parse_any(&adv, c)) {
ilog(LOG_DEBUG, "Could not parse '%s' as an address, attempting DNS lookup", c);
if (sockaddr_getaddrinfo(&adv, c)) {
ilog(LOG_WARN, "DNS lookup for '%s' failed", c);
return -1;
}
}
if (is_addr_unspecified(&adv))
return -1;
}

@ -702,8 +702,8 @@ The command-line options B<-i> or B<--interface>, or equivalently the
B<interface> config file option, specify local network interfaces for RTP.
At least one must be given, but multiple can be specified.
The format of the value is [I<NAME>B</>]I<IP>[!I<IP>] with I<IP> being
either an IPv4 address, an IPv6 address, or the name of a system network
interface (such as I<eth0>).
either an IPv4 address, an IPv6 address, the name of a system network interface
(such as I<eth0>), or a DNS host name (such as I<test.example.com>).
The possibility of configuring a network interface by name rather than
by address should not be confused with the logical interface name used
@ -717,6 +717,9 @@ I<eth0>, you would use the syntax I<int/eth0>.
(Unless omitted, the second I<IP> token used for the advertised address
must be an actual network address and cannot be an interface name.)
If DNS host names are used instead of addresses or interface names, the lookup
will be done only once during daemon start-up.
To configure multiple interfaces using the command-line options,
simply present multiple B<-i> or B<--interface> options.
When using the config file, only use a single B<interface> line,

Loading…
Cancel
Save