From 3ec7e0af60ea52a1db143a5cb001c0cf171da064 Mon Sep 17 00:00:00 2001
From: bitcoffee <liuxin350@huawei.com>
Date: Thu, 12 Dec 2024 19:13:53 +0800
Subject: [PATCH] fix oncn-mda don't support use ipv6 family in sockops

Signed-off-by: bitcoffee <liuxin350@huawei.com>
---
 oncn-mda/ebpf_src/sock_ops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/oncn-mda/ebpf_src/sock_ops.c b/oncn-mda/ebpf_src/sock_ops.c
index f5ab001..92840cc 100644
--- a/oncn-mda/ebpf_src/sock_ops.c
+++ b/oncn-mda/ebpf_src/sock_ops.c
@@ -397,7 +397,7 @@ static void clean_ops_map(struct bpf_sock_ops *const skops)
 SEC("sockops")
 int SOCK_OPS_NAME(struct bpf_sock_ops *const skops)
 {
-    if (skops->family != AF_INET)
+    if ((skops->family != AF_INET) && (skops->family != AF_INET6))
         return 0;
 
     switch (skops->op) {
-- 
2.33.0

