diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-03-25 19:00:36 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2022-03-25 19:00:36 +0100 |
commit | 364009e4317fb5c6732635726b511613aa2ed519 (patch) | |
tree | 44c5f4b54a47e3ba3c811ddd4bb43ee5ae1bb709 /src/conf_mode/system-ip.py | |
parent | f8b3d8999cbea988ce8e7d303957558308ddc1bc (diff) | |
download | vyos-1x-364009e4317fb5c6732635726b511613aa2ed519.tar.gz vyos-1x-364009e4317fb5c6732635726b511613aa2ed519.zip |
vyos.util: T4319: rename sysctl() -> sysctl_write()
Diffstat (limited to 'src/conf_mode/system-ip.py')
-rwxr-xr-x | src/conf_mode/system-ip.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/conf_mode/system-ip.py b/src/conf_mode/system-ip.py index 8b97725ac..05fc3a97a 100755 --- a/src/conf_mode/system-ip.py +++ b/src/conf_mode/system-ip.py @@ -20,7 +20,7 @@ from vyos.config import Config from vyos.configdict import dict_merge from vyos.util import call from vyos.util import dict_search -from vyos.util import sysctl +from vyos.util import sysctl_write from vyos.util import write_file from vyos.xml import defaults from vyos import ConfigError @@ -53,11 +53,11 @@ def apply(opt): # table_size has a default value - thus the key always exists size = int(dict_search('arp.table_size', opt)) # Amount upon reaching which the records begin to be cleared immediately - sysctl('net.ipv4.neigh.default.gc_thresh3', size) + sysctl_write('net.ipv4.neigh.default.gc_thresh3', size) # Amount after which the records begin to be cleaned after 5 seconds - sysctl('net.ipv4.neigh.default.gc_thresh2', size // 2) + sysctl_write('net.ipv4.neigh.default.gc_thresh2', size // 2) # Minimum number of stored records is indicated which is not cleared - sysctl('net.ipv4.neigh.default.gc_thresh1', size // 8) + sysctl_write('net.ipv4.neigh.default.gc_thresh1', size // 8) # enable/disable IPv4 forwarding tmp = dict_search('disable_forwarding', opt) @@ -67,11 +67,11 @@ def apply(opt): # configure multipath tmp = dict_search('multipath.ignore_unreachable_nexthops', opt) value = '1' if (tmp != None) else '0' - sysctl('net.ipv4.fib_multipath_use_neigh', value) + sysctl_write('net.ipv4.fib_multipath_use_neigh', value) tmp = dict_search('multipath.layer4_hashing', opt) value = '1' if (tmp != None) else '0' - sysctl('net.ipv4.fib_multipath_hash_policy', value) + sysctl_write('net.ipv4.fib_multipath_hash_policy', value) if __name__ == '__main__': try: |