From 2abf2b072d7616ffa760461b6d6bd44a28490066 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 14 Apr 2016 21:13:51 -0400 Subject: nat/vty: Remove second assumption about lo and binding If we want to separate the BSCs we should separate based on the source port and not the source ip (at least in the current test setup). Fixes: ====================================================================== ERROR: testBSCreload (__main__.TestVTYNAT) ---------------------------------------------------------------------- Traceback (most recent call last): File "./vty_test_runner.py", line 658, in testBSCreload b0 = nat_bsc_sock_test(0, "lol") File "./vty_test_runner.py", line 1145, in nat_bsc_sock_test bsc.bind(('127.0.0.1' + str(nr), 0)) File "", line 1, in bind error: [Errno 99] Cannot assign requested address ---------------------------------------------------------------------- --- openbsc/tests/vty_test_runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openbsc/tests') diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py index 3c2c233ed..a767ff075 100644 --- a/openbsc/tests/vty_test_runner.py +++ b/openbsc/tests/vty_test_runner.py @@ -1142,7 +1142,7 @@ def nat_bsc_num_con(x): def nat_bsc_sock_test(nr, tk, verbose = False): bsc = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - bsc.bind(('127.0.0.1' + str(nr), 0)) + bsc.bind(('127.0.0.1', 0)) bsc.connect(('127.0.0.1', 5000)) if (verbose): print "BSC%d " %nr -- cgit v1.2.3