diff options
author | Daniil Baturin <daniil@vyos.io> | 2022-04-07 17:19:02 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-07 17:19:02 +0300 |
commit | 155aa912a59f42102546568d6bf3dc1883306d74 (patch) | |
tree | d6a2bc301525d859b32f6f63896a7f78a1ec9859 /python/vyos/util.py | |
parent | 8ca5b232877fddc1c7bceeb26332e0caccfca279 (diff) | |
parent | 5b11ad0024552f9072c8bc046bb8ce7ad5a193b2 (diff) | |
download | vyos-1x-155aa912a59f42102546568d6bf3dc1883306d74.tar.gz vyos-1x-155aa912a59f42102546568d6bf3dc1883306d74.zip |
Merge pull request #1261 from c-po/t4319-disable-ipv6-equuleus
T4319: bugfixes for disabled IPv6 (equuleus)
Diffstat (limited to 'python/vyos/util.py')
-rw-r--r-- | python/vyos/util.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/python/vyos/util.py b/python/vyos/util.py index b5d81fba5..4283e604c 100644 --- a/python/vyos/util.py +++ b/python/vyos/util.py @@ -827,3 +827,7 @@ def sysctl_write(name, value): call(f'sysctl -wq {name}={value}') return True return False + +def is_ipv6_enabled() -> bool: + """ Check if IPv6 support on the system is enabled or not """ + return (sysctl_read('net.ipv6.conf.all.disable_ipv6') == '0') |