summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorliuxueli <[email protected]>2022-04-15 09:43:58 +0800
committerliuxueli <[email protected]>2022-04-15 09:43:58 +0800
commit11fa03babe930b02e0c1dcfd4b5986586d307be2 (patch)
treea188cb56d7f5a4c6c716c46b64a653aea7d67ee1 /test
parentab19f51906dccccd5c5889361258202ae7733250 (diff)
TSG-10227: 客户端与服务端再同一侧且使用同一个链路方向,错误的封装VNI的方向导致拦截失败v4.2.84
Diffstat (limited to 'test')
-rw-r--r--test/test_app_sapp.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/test_app_sapp.c b/test/test_app_sapp.c
index e0df65f..9968859 100644
--- a/test/test_app_sapp.c
+++ b/test/test_app_sapp.c
@@ -2710,6 +2710,24 @@ char stream_bridge_tcpall_entry(struct streaminfo *pstream,void **pme, int threa
return APP_STATE_GIVEME;
}
+char vxlan_inject_tcp_entry(struct streaminfo *a_tcp, void **pme, int thread_seq,void *a_packet)
+{
+ if(a_tcp->ptcpdetail->pdata && a_tcp->ptcpdetail->datalen)
+ {
+ struct mesa_ip4_hdr *ip4hdr = (struct mesa_ip4_hdr *)a_packet;
+ int ret = sapp_inject_pkt(a_tcp, SIO_EXCLUDE_THIS_LAYER_HDR, a_packet, ntohs(ip4hdr->ip_len), 0);
+ printf("polling inject pkt dir = 0: %s, ret = %d \n", printaddr(&a_tcp->addr, thread_seq), ret);
+
+ ret = sapp_inject_pkt(a_tcp, SIO_EXCLUDE_THIS_LAYER_HDR, a_packet, ntohs(ip4hdr->ip_len), 1);
+ printf("polling inject pkt dir = 1: %s, ret = %d \n", printaddr(&a_tcp->addr, thread_seq), ret);
+ }
+
+ //ret = sapp_inject_pkt(stream, SIO_EXCLUDE_THIS_LAYER_HDR, a_packet, ntohs(ip4hdr->ip_len), 1);
+// printf("polling inject pkt dir = 1: %s, ret = %d \n", printaddr(&stream->addr, thread_seq), ret);
+
+ return APP_STATE_GIVEME;
+}
+
char UDP_ENTRY(struct streaminfo *a_tcp, void **pme, int thread_seq,void *a_packet)
{