selftests: forwarding: lib: Add sysctl_set(), sysctl_restore()
authorPetr Machata <petrm@mellanox.com>
Thu, 3 May 2018 10:36:59 +0000 (12:36 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 May 2018 17:37:02 +0000 (13:37 -0400)
commitf5ae57784ba805d0e8b11db1a7b2c17c5a07dd70
tree1f6bed8d18e8db4b03b25662e2f85b7f5c66f1e8
parent41f405460a0471e2183a6d4149608a964f6dc63f
selftests: forwarding: lib: Add sysctl_set(), sysctl_restore()

Add two helper functions: sysctl_set() to change the value of a given
sysctl setting, and sysctl_restore() to change it back to what it was.

Signed-off-by: Petr Machata <petrm@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/forwarding/lib.sh