diff --git a/shared/templates/sysctl/oval.template b/shared/templates/sysctl/oval.template
index dd34e10f8c5..21b09af5620 100644
--- a/shared/templates/sysctl/oval.template
+++ b/shared/templates/sysctl/oval.template
@@ -20,7 +20,7 @@
^[\s]*{{{ SYSCTLVAR }}}[\s]*=[\s]*(.*\S)[\s]*$
1
{{%- endmacro -%}}
-{{%- if "P" in FLAGS -%}}
+{{%- if IPV6 == "false" -%}}
@@ -36,7 +36,7 @@
-{{%- elif "I" in FLAGS -%}}
+{{%- else -%}}
diff --git a/shared/templates/sysctl/sce-bash.template b/shared/templates/sysctl/sce-bash.template
index 1b24f0a11b8..e86afc4f770 100644
--- a/shared/templates/sysctl/sce-bash.template
+++ b/shared/templates/sysctl/sce-bash.template
@@ -62,7 +62,7 @@ function check_sysctl_configuration()
return $XCCDF_RESULT_FAIL
}
-{{% if "I" in FLAGS -%}}
+{{% if IPV6 == "true" -%}}
# pass if IPv6 is disabled
check_sysctl_configuration "net.ipv6.conf.all.disable_ipv6" "1"
if [[ $? == $XCCDF_RESULT_PASS ]] ; then
diff --git a/shared/templates/sysctl/template.py b/shared/templates/sysctl/template.py
index 651fa0c0eb6..f03c22e5052 100644
--- a/shared/templates/sysctl/template.py
+++ b/shared/templates/sysctl/template.py
@@ -5,10 +5,10 @@ def preprocess(data, lang):
data["sysctlid"] = ssg.utils.escape_id(data["sysctlvar"])
if not data.get("sysctlval"):
data["sysctlval"] = ""
- ipv6_flag = "P"
if data["sysctlid"].find("ipv6") >= 0:
- ipv6_flag = "I"
- data["flags"] = ipv6_flag
+ data["ipv6"] = "true"
+ else:
+ data["ipv6"] = "false"
if "operation" not in data:
data["operation"] = "equals"
if isinstance(data["sysctlval"], list) and len(data["sysctlval"]) == 0: