tempesta-tech / tempesta-test

Test suite for Tempesta FW
10 stars 4 forks source link

Deproxy client isn't closed on errors (probably RSTs) if "interface" argument isn't passed #492

Closed voodam closed 10 months ago

voodam commented 11 months ago

Flow of the error:

  1. TempestaTest.__create_client, if client.get("interface", False): here we create alias interface and route, then pass IP to __create_client_deproxy. But, even if create_interface and create_route are disabled and only IP is passed, error is gone. Thus, error can be only in __create_client_deproxy.

  2. Passed IP is used only in TlsClient.run_start:

         if self.bind_addr:
             self.bind((self.bind_addr, 0))

So the root cause is bind. In my test even binding to random address (without creating interface and route) makes self.assertTrue(client.wait_for_connection_close(self.timeout)) pass.

Result: all commented parts in t_frang/test_ip_block.py should be uncommented and pass. Blocker: https://github.com/tempesta-tech/tempesta/issues/1751, wait when all tests with this issue in reason will be fixed.

voodam commented 10 months ago

Fixed in https://github.com/tempesta-tech/tempesta-test/pull/486.