diff options
| author | luwenpeng <[email protected]> | 2023-11-20 15:36:28 +0800 |
|---|---|---|
| committer | luwenpeng <[email protected]> | 2023-11-20 16:56:49 +0800 |
| commit | dc305adb3b583e7e2a72bce54820d49cb83b3a8f (patch) | |
| tree | 12de7e243efc642f5974bf105dd78a7076305c02 /platform | |
| parent | 134d2c82b7ebc2229fac03be721555e37f4db571 (diff) | |
SCE适配Firewall控制报文变更: Reset All控制报文的mpack->Session ID为0,mbuffer->Payload Offset为0v1.2.3-20231120
Diffstat (limited to 'platform')
| -rw-r--r-- | platform/src/packet_io.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/platform/src/packet_io.cpp b/platform/src/packet_io.cpp index a1effe0..3fb22a4 100644 --- a/platform/src/packet_io.cpp +++ b/platform/src/packet_io.cpp @@ -2,6 +2,7 @@ #include <arpa/inet.h> #include <netinet/in.h> #include <netinet/ip.h> +#define __FAVOR_BSD 1 #include <netinet/udp.h> #include <netinet/ether.h> @@ -1013,11 +1014,11 @@ static void handle_session_active(struct metadata *meta, struct control_packet * static void handle_session_resetall(struct metadata *meta, struct control_packet *ctrl_pkt, struct thread_ctx *thread_ctx) { - struct thread_metrics *thread_metrics = &thread_ctx->thread_metrics; + struct global_metrics *global_metrics = thread_ctx->ref_global_metrics; struct sce_ctx *sce_ctx = thread_ctx->ref_sce_ctx; LOG_ERROR("%s: session %lu resetall: notification clears all session tables !!!", LOG_TAG_PKTIO, meta->session_id); - ATOMIC_ZERO(&(thread_metrics->sf_session.num)); + ATOMIC_ZERO(&(global_metrics->sf_session.num)); for (int i = 0; i < sce_ctx->nr_worker_threads; i++) { struct thread_ctx *temp_ctx = &sce_ctx->work_threads[i]; |
