Bug #2647
closedVTY local-ip cmd in "listen m3ua <PORT>" node not applied.
100%
Description
In osmo-stp, cmd "local-ip" inside node "listen m3ua 2905" is actually not applied. Because the server is created + bound at "listen" command time using NULL as IP, and at "local-ip" time the IP is changed but the server is not re-bound using the new IP, so it keeps listening at 0.0.0.0.
One possibility is adding code to re-bind the socket after setting the IP in "local-ip". With this way, however, e we cannot identify 2 servers which use different IP but same port. Furthermore, the code first binds against 0.0.0.0 and then it binds against the specific IP, which can create more problems. For instance, if 2 osmo-stp instances are started almost at the same time, one may bind to 0.0.0.0 and then the 2nd one may do the same before the 1st once changes the socket bound, which means the 2nd instance will fail to bind to 0.0.0.0.
I think we should have the IP in the "listen" cmd, but this means breaking backwards compatibility in VTY: listen m3ua A.B.C.D 2905 <0-65534>