summaryrefslogtreecommitdiff
path: root/python/vyos/util.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-03-31 21:21:39 +0200
committerGitHub <noreply@github.com>2022-03-31 21:21:39 +0200
commit86168af4b95c64452e3f049e4f4c15cbaf55caff (patch)
tree5309ccac8b067407b49e89499a3768580bb936b0 /python/vyos/util.py
parent77f9fc8e9358d5e1d3bbf700b31865e4dc266491 (diff)
parenta33b737b753843501c86eee744aef75137d2b64e (diff)
downloadvyos-1x-86168af4b95c64452e3f049e4f4c15cbaf55caff.tar.gz
vyos-1x-86168af4b95c64452e3f049e4f4c15cbaf55caff.zip
Merge pull request #1258 from c-po/t4319-disable-ipv6
T4319: bugfixes for disabled IPv6 (current)
Diffstat (limited to 'python/vyos/util.py')
-rw-r--r--python/vyos/util.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/python/vyos/util.py b/python/vyos/util.py
index f46775490..f3f323c34 100644
--- a/python/vyos/util.py
+++ b/python/vyos/util.py
@@ -1019,3 +1019,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')