update TCP utils
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include "uthash.h"
|
||||
#include "packet.h"
|
||||
#include "udp_utils.h"
|
||||
#include "tcp_utils.h"
|
||||
|
||||
#define likely(expr) __builtin_expect((expr), 1)
|
||||
#define unlikely(expr) __builtin_expect((expr), 0)
|
||||
@@ -977,7 +978,7 @@ static inline const char *parse_tcp(struct packet *handler, const char *data, ui
|
||||
{
|
||||
return data;
|
||||
}
|
||||
uint16_t hdr_len = ((struct tcphdr *)data)->th_off << 2;
|
||||
uint16_t hdr_len = tcp_hdr_get_hdr_len((struct tcphdr *)data);
|
||||
SET_LAYER(handler, layer, LAYER_TYPE_TCP, hdr_len, data, len);
|
||||
|
||||
return layer->pld_ptr;
|
||||
|
||||
Reference in New Issue
Block a user