[sr-dev] [kamailio/kamailio] core: Add virtual flag to listen config to ignore inactive ip addresses (PR #2985)

rhys-hanrahan notifications at github.com
Thu Dec 23 15:22:09 CET 2021


Just wanted to add a note for one limitation I stumbled onto. As per this thread, if your hosts file contains an entry for your local machine name, then my method for listing local IPs does not work: https://stackoverflow.com/questions/1160963/how-to-enumerate-all-ip-addresses-attached-to-a-machine-in-posix-c

I just tested this out and confirmed it doesn't work. My machine had default entries for localhost only - so this code has worked fine in my testing. Right now I am just thinking of making a note of this requirement in the cookbook.

```
127.0.0.1       localhost.localdomain   localhost
::1             localhost6.localdomain6 localhost6
```

If there's any suggestions for a better way of getting a list of local IPs I'm open to that, but so far I haven't seen an alternative that doesn't have the same issue and is multi-platform.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2985#issuecomment-1000337543
You are receiving this because you are subscribed to this thread.

Message ID: <kamailio/kamailio/pull/2985/c1000337543 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20211223/eae96db7/attachment.htm>


More information about the sr-dev mailing list