diff --git a/daemon/main.c b/daemon/main.c index e10765d8d..6d60b52b4 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -180,8 +180,13 @@ static void __find_if_name(char *s, struct ifaddrs *ifas, GQueue *addrs) { sockaddr_t *addr; for (struct ifaddrs *ifa = ifas; ifa; ifa = ifa->ifa_next) { - if (strcmp(ifa->ifa_name, s)) + if (!strcmp(s, "any")) { + if ((ifa->ifa_flags & IFF_LOOPBACK)) + continue; + } + else if (strcmp(ifa->ifa_name, s)) continue; + if (!(ifa->ifa_flags & IFF_UP)) continue; if (!ifa->ifa_addr) diff --git a/daemon/rtpengine.pod b/daemon/rtpengine.pod index 71a93e813..fe6dd23bb 100644 --- a/daemon/rtpengine.pod +++ b/daemon/rtpengine.pod @@ -1016,7 +1016,7 @@ B 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 [IB]I[!I] with I being either an IPv4 address, an IPv6 address, the name of a system network interface -(such as I), or a DNS host name (such as I). +(such as I), a DNS host name (such as I), or B. The possibility of configuring a network interface by name rather than by address should not be confused with the logical interface name used @@ -1033,6 +1033,10 @@ 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. +The special keyword B can be used to listen on any and all available local +interface addresses except from loopback devices. This keyword should only be +given once in place of a more explicit interface configuration. + 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 line,