diff options
author | eric_kuang.rs <eric_kuang.rs@realtek.com> | 2021-12-01 12:06:35 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-12-01 12:06:35 +0000 |
commit | defaf41ccbf0df76b1f9bd7bbbf949202825ae15 (patch) | |
tree | 427695943c0c3e8ec51dd5534595b16e6fd6b469 | |
parent | 5c36a24d56b0c29dfc736cb0c5ae12293f593f74 (diff) | |
parent | b0d71ca51626f49856df2ba01d24c7c073bb044f (diff) | |
download | tests-defaf41ccbf0df76b1f9bd7bbbf949202825ae15.tar.gz |
net-test: not supported in netns before 4.15 if BH_TIMEOUT_SYSCTL does not exist. am: 7b07e88d38 am: 4527d77bf7 am: d61c3570e2 am: b0d71ca516
Original change: https://android-review.googlesource.com/c/kernel/tests/+/1906374
Change-Id: I7e71937747488e5f59bae0876efdac7b982abf2b
-rwxr-xr-x | net/test/tcp_fastopen_test.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/test/tcp_fastopen_test.py b/net/test/tcp_fastopen_test.py index 5b89a2d..9c777c6 100755 --- a/net/test/tcp_fastopen_test.py +++ b/net/test/tcp_fastopen_test.py @@ -22,6 +22,7 @@ from scapy import all as scapy import multinetwork_base import net_test +import os import packets import tcp_metrics @@ -67,6 +68,9 @@ class TcpFastOpenTest(multinetwork_base.MultiNetworkBaseTest): def clearBlackhole(self): if net_test.LINUX_VERSION < (4, 14, 0): return + # Prior to 4.15 this sysctl is not namespace aware. + if net_test.LINUX_VERSION < (4, 15, 0) and not os.path.exists(BH_TIMEOUT_SYSCTL): + return timeout = self.GetSysctl(BH_TIMEOUT_SYSCTL) # Write to timeout to clear any pre-existing blackhole condition |