]> git.meshlink.io Git - meshlink/commit - src/meshlink.c
Fall back to getifaddrs() to get an interface address if there is no default route.
authorGuus Sliepen <guus@meshlink.io>
Sat, 8 Feb 2020 13:55:21 +0000 (14:55 +0100)
committerGuus Sliepen <guus@meshlink.io>
Sat, 8 Feb 2020 14:00:47 +0000 (15:00 +0100)
commit3fe7713c4f9d16f192271bc4fa8a2ffda6bb28fd
tree275bdddd1057db88e8c5fcbd4ca20aae822cde7f
parent4bd83124d50260738991f59a6afe23a31cb672ab
Fall back to getifaddrs() to get an interface address if there is no default route.

When generating invitations, we try to find a suitable local interface
address by faking an outgoing connection to the Internet. However,
that doesn't work if there is no default route. In this case, fall back
to using getifaddrs() if that function is available, and filter out any
link-local and loopback addresses.
src/meshlink.c