From fe50047ddfc1f1ff775f62b7b8aa9f5fcf396c40 Mon Sep 17 00:00:00 2001
From: weli-l <1289113577@qq.com>
Date: Thu, 18 Jul 2024 10:32:36 +0800
Subject: [PATCH] fix oncn-mda donot support uid in oe24.03

Signed-off-by: weli-l <1289113577@qq.com>
---
 kmesh_macros_env.sh | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/kmesh_macros_env.sh b/kmesh_macros_env.sh
index 3b1bfab..01a6934 100644
--- a/kmesh_macros_env.sh
+++ b/kmesh_macros_env.sh
@@ -15,17 +15,17 @@ else
 fi
 
 # MDA_NAT_ACCEL
-if grep -q "FN(sk_original_addr)" $KERNEL_HEADER_LINUX_BPF; then
-	set_config MDA_NAT_ACCEL 1
+if [[ "$KERNEL_VERSION" < "6.6.0" ]]; then
+    set_config MDA_NAT_ACCEL 0
 else
-	set_config MDA_NAT_ACCEL 0
+    set_config MDA_NAT_ACCEL 1
 fi
 
 # MDA_GID_UID_FILTER
-if grep -q "FN(get_sockops_uid_gid)" $KERNEL_HEADER_LINUX_BPF; then
-	set_config MDA_GID_UID_FILTER 1
+if [[ "$KERNEL_VERSION" < "6.6.0" ]]; then
+    set_config MDA_NAT_ACCEL 0
 else
-	set_config MDA_GID_UID_FILTER 0
+    set_config MDA_NAT_ACCEL 1
 fi
 
 # OE_23_03
-- 
2.34.1

