mgcp: Allow to bind to different ports for net/bts ports
When using multiple interfaces on a system one can now configure
which will be served for the BTS ports and which will be served
for the network. The direct usage of source_addr is now only to
initialize the MGCP receiving port itself.
diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py
index 72471d8..8db0825 100644
--- a/openbsc/tests/vty_test_runner.py
+++ b/openbsc/tests/vty_test_runner.py
@@ -92,6 +92,28 @@
# TODO: test it for the trunk!
+ def testBindAddr(self):
+ self.vty.enable()
+
+ self.vty.command("configure terminal")
+ self.vty.command("mgcp")
+
+ # enable.. disable bts-bind-ip
+ self.vty.command("rtp bts-bind-ip 254.253.252.250")
+ res = self.vty.command("show running-config")
+ self.assert_(res.find('rtp bts-bind-ip 254.253.252.250') > 0)
+ self.vty.command("no rtp bts-bind-ip")
+ res = self.vty.command("show running-config")
+ self.assertEquals(res.find(' rtp bts-bind-ip'), -1)
+
+ # enable.. disable net-bind-ip
+ self.vty.command("rtp net-bind-ip 254.253.252.250")
+ res = self.vty.command("show running-config")
+ self.assert_(res.find('rtp net-bind-ip 254.253.252.250') > 0)
+ self.vty.command("no rtp net-bind-ip")
+ res = self.vty.command("show running-config")
+ self.assertEquals(res.find(' rtp net-bind-ip'), -1)
+
class TestVTYGenericBSC(TestVTYBase):