summaryrefslogtreecommitdiffstats
path: root/src/target/trx_toolkit/clck_gen.py
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-03-21 13:46:34 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2018-04-04 17:14:26 +0000
commit55afe0072b435a0d9abc2db934ec9f17d4fb07dd (patch)
tree4024840f040ee162659d1ef404e7707cbbee1212 /src/target/trx_toolkit/clck_gen.py
parent9d90d1907b9d1013a07ef7a9c187f16bc29129fb (diff)
trx_toolkit: Add cmdline arg to set bind addr
Previous hardcoded default of 0.0.0.0 was inappropiate in some scenarios, as it sets the SRC addr of the packets sent through the socket based on the routing. For instance, if iface IF1 has assigned two IP addresses A and B, A being the first addr of the interface, and osmo-bts-trx is configured with "osmotrx ip local A" and "osmotrx ip remote B", the following happens: CMD POWER OFF src=A:5801 dst=B:5701 RSP POWER OFF src=A:5701 dst=A:5701 <-- A is assigned as src addr. But osmo-bts-trx is waiting for packets from B:5701, and the packet is dropped with ICMP Unreachable. If addr binding is forced in fake_trx to B, then everthing's fine. Let's extend the UDPLink in order to allow manual, but optional setting of bind address, and add a corresponding cmdline argument to all executables. Change-Id: I7be18fef40967fb7551f4115f22cbbd9cdb0840d
Diffstat (limited to 'src/target/trx_toolkit/clck_gen.py')
-rwxr-xr-xsrc/target/trx_toolkit/clck_gen.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/target/trx_toolkit/clck_gen.py b/src/target/trx_toolkit/clck_gen.py
index 4b86c31a..b488770e 100755
--- a/src/target/trx_toolkit/clck_gen.py
+++ b/src/target/trx_toolkit/clck_gen.py
@@ -102,7 +102,7 @@ class Application:
signal.signal(signal.SIGINT, self.sig_handler)
def run(self):
- self.link = UDPLink("127.0.0.1", 5800, 5700)
+ self.link = UDPLink("127.0.0.1", 5800, "0.0.0.0", 5700)
self.clck = CLCKGen([self.link], ind_period = 51)
self.clck.start()