From 7ca3d5cfe81ecc84445c934445d1b4bb40a419d5 Mon Sep 17 00:00:00 2001 From: fumingwei Date: Mon, 19 Oct 2020 19:15:56 +0800 Subject: [PATCH] =?UTF-8?q?kni=20=E8=BF=87=E6=BB=A4tunnel=20=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E7=9A=84stream?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/kni_entry.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/entry/src/kni_entry.cpp b/entry/src/kni_entry.cpp index 9751217..8830659 100644 --- a/entry/src/kni_entry.cpp +++ b/entry/src/kni_entry.cpp @@ -1565,6 +1565,8 @@ extern "C" char kni_tcpall_entry(struct streaminfo *stream, void** pme, int thre int ret; int can_destroy; struct pme_info *pmeinfo = *(struct pme_info **)pme; + unsigned short stream_tunnel_type = STREAM_TUNNLE_NON; + int stream_tunnel_type_len = sizeof(unsigned short); /* a_packet == NULL && not op_state_close, continue close: a_packet may be null, if a_packet = null, do not send to tfe */ @@ -1577,6 +1579,14 @@ extern "C" char kni_tcpall_entry(struct streaminfo *stream, void** pme, int thre KNI_LOG_ERROR(logger, "addr_type(%d) is not ipv4 or ipv6, bypass stream"); return APP_STATE_FAWPKT | APP_STATE_DROPME; } + + ret=MESA_get_stream_opt(stream, MSO_STREAM_TUNNEL_TYPE, (void *)&stream_tunnel_type, &stream_tunnel_type_len); + if(ret != STREAM_TUNNLE_NON) + { + KNI_LOG_DEBUG(logger, "stream type is tunnel, type = %d",ret); + return APP_STATE_FAWPKT | APP_STATE_DROPME; + } + switch(stream->pktstate){ case OP_STATE_PENDING: //FS_operate(g_kni_fs_handle->handle, g_kni_fs_handle->fields[KNI_FIELD_STATE_PENDING], 0, FS_OP_ADD, 1);