SCE适配Firewall控制报文变更: Reset All控制报文的mpack->Session ID为0,mbuffer->Payload Offset为0
This commit is contained in:
@@ -69,11 +69,14 @@ int control_packet_parse(struct control_packet *handler, const char *data, size_
|
|||||||
goto error_out;
|
goto error_out;
|
||||||
}
|
}
|
||||||
handler->session_id = mpack_node_u64(temp);
|
handler->session_id = mpack_node_u64(temp);
|
||||||
if (handler->session_id == 0)
|
/*
|
||||||
{
|
* reset all session id is zero
|
||||||
LOG_ERROR("%s: unexpected control packet: (invalid session_id value) %lu", LOG_TAG_CTRLPKT, handler->session_id);
|
* if (handler->session_id == 0)
|
||||||
goto error_out;
|
* {
|
||||||
}
|
* LOG_ERROR("%s: unexpected control packet: (invalid session_id value) %lu", LOG_TAG_CTRLPKT, handler->session_id);
|
||||||
|
* goto error_out;
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
|
||||||
// state
|
// state
|
||||||
temp = mpack_node_map_cstr(root, "state");
|
temp = mpack_node_map_cstr(root, "state");
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <netinet/ip.h>
|
#include <netinet/ip.h>
|
||||||
|
#define __FAVOR_BSD 1
|
||||||
#include <netinet/udp.h>
|
#include <netinet/udp.h>
|
||||||
#include <netinet/ether.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)
|
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;
|
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);
|
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++)
|
for (int i = 0; i < sce_ctx->nr_worker_threads; i++)
|
||||||
{
|
{
|
||||||
struct thread_ctx *temp_ctx = &sce_ctx->work_threads[i];
|
struct thread_ctx *temp_ctx = &sce_ctx->work_threads[i];
|
||||||
|
|||||||
Reference in New Issue
Block a user