zehome / MLVPN

Multi-link VPN (ADSL/SDSL/xDSL/Network aggregation / bonding)
http://www.mlvpn.fr/
BSD 2-Clause "Simplified" License
523 stars 130 forks source link

mlvpn client not working with bindhost defined #129

Closed rapenne-s closed 4 years ago

rapenne-s commented 4 years ago

I found that mlvpn-2.4.3 client was stopping at this line if I use a "bindhost" line in the client configuration : https://github.com/zehome/MLVPN/blob/master/src/mlvpn.c#L796

I tried to set "0.0.0.0" or the actual IP on the interface, but it seems it fallack to "any" if it's not set.

If I don't set "bindhost" then mlvpn works as expected.

I run mlvpn on OpenBSD -current (development version from 23 March 2020).

zehome commented 4 years ago

Thank you for the report. The problem is that mlvpn does not check properly if bindport is NULL or not and sends an empty string to getaddrinfo.

I've also found another problem if getaddrinfo gets no results (0 len) without error, then mlvpn crashed by freeing an empty struct