vty tests: testBSCreload: ipa_handle_small: ensure rx of 4 bytes

Change-Id: I995b7aba9d0b51b0861a4281dbbca888f36e9e00
This commit is contained in:
Neels Hofmeyr 2017-02-03 04:23:46 +01:00
parent b39053ad6d
commit ba1468e4c6
1 changed files with 2 additions and 0 deletions

View File

@ -1239,6 +1239,8 @@ def nat_msc_test(x, ip, port, verbose = False):
def ipa_handle_small(x, verbose = False):
s = data2str(x.recv(4))
if len(s) != 4*2:
raise Exception("expected to receive 4 bytes, but got %d (%r)" % (len(s)/2, s))
if "0001fe00" == s:
if (verbose):
print "\tBSC <- NAT: PING?"