diff options
| author | Rafael Zalamena <rzalamena@users.noreply.github.com> | 2021-06-02 10:47:10 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-02 10:47:10 -0300 |
| commit | d532d1092e165dc9b7164039c0366c4f2856c9f9 (patch) | |
| tree | bed48c7e62accfb5f7e2a74302143e7fb739f076 /tests/topotests/lib/common_config.py | |
| parent | bb117f044602662c5ed50727eb9e424c4b653163 (diff) | |
| parent | 75b8d4823696490fc025a97b581439bcb7740604 (diff) | |
Merge pull request #8644 from idryzhov/fix-vrf-bind
lib: fix binding to a vrf
Diffstat (limited to 'tests/topotests/lib/common_config.py')
| -rw-r--r-- | tests/topotests/lib/common_config.py | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/tests/topotests/lib/common_config.py b/tests/topotests/lib/common_config.py index 5a904423c2..ee7cd6a7af 100644 --- a/tests/topotests/lib/common_config.py +++ b/tests/topotests/lib/common_config.py @@ -4487,51 +4487,3 @@ def verify_ip_nht(tgen, input_dict): logger.debug("Exiting lib API: verify_ip_nht()") return False - - -def kernel_requires_l3mdev_adjustment(): - """ - Checks if the L3 master device needs to be adjusted to handle VRF traffic - based on kernel version. - - Returns - ------- - 1 or 0 - """ - - if version_cmp(platform.release(), "4.15") >= 0: - return 1 - return 0 - - -def adjust_router_l3mdev(tgen, router): - """ - Adjusts a routers L3 master device to handle VRF traffic depending on kernel - version. - - Parameters - ---------- - * `tgen` : tgen object - * `router` : router id to be configured. - - Returns - ------- - True - """ - - l3mdev_accept = kernel_requires_l3mdev_adjustment() - - logger.info( - "router {0}: setting net.ipv4.tcp_l3mdev_accept={1}".format( - router, l3mdev_accept - ) - ) - - output = tgen.net[router].cmd("sysctl -n net.ipv4.tcp_l3mdev_accept") - logger.info("router {0}: existing tcp_l3mdev_accept was {1}".format(router, output)) - - tgen.net[router].cmd( - "sysctl -w net.ipv4.tcp_l3mdev_accept={}".format(l3mdev_accept) - ) - - return True |
