release: version 1.0.5 - fix TCP options detection (NOP/EOL/SACK)
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
Jacquin Antoine
2026-03-01 01:27:27 +01:00
parent a3f5d9a50c
commit a69de782cb
4 changed files with 13 additions and 4 deletions

View File

@ -35,7 +35,7 @@ COPY . .
# Build binary for Linux # Build binary for Linux
# Binary will be dynamically linked but compatible with all RHEL-based distros # Binary will be dynamically linked but compatible with all RHEL-based distros
ARG VERSION=1.0.0 ARG VERSION=1.0.5
ARG BUILD_TIME="" ARG BUILD_TIME=""
ARG GIT_COMMIT="" ARG GIT_COMMIT=""
RUN mkdir -p dist && \ RUN mkdir -p dist && \
@ -53,7 +53,7 @@ FROM rockylinux:9 AS rpm-builder
WORKDIR /package WORKDIR /package
# VERSION must be redeclared for each stage that needs it # VERSION must be redeclared for each stage that needs it
ARG VERSION=1.0.0 ARG VERSION=1.0.5
# Install rpm-build tools (Rocky Linux 9) # Install rpm-build tools (Rocky Linux 9)
RUN dnf install -y \ RUN dnf install -y \

View File

@ -22,7 +22,7 @@ import (
var ( var (
// Version information (set via ldflags) // Version information (set via ldflags)
Version = "1.0.0" Version = "1.0.5"
BuildTime = "unknown" BuildTime = "unknown"
GitCommit = "unknown" GitCommit = "unknown"
) )

View File

@ -344,6 +344,12 @@ func extractTCPMeta(tcp *layers.TCP) api.TCPMeta {
// Parse TCP options // Parse TCP options
for _, opt := range tcp.Options { for _, opt := range tcp.Options {
switch opt.OptionType { switch opt.OptionType {
case layers.TCPOptionKindEndList:
// End of Options List - skip silently
continue
case layers.TCPOptionKindNop:
// No Operation (padding) - skip silently
continue
case layers.TCPOptionKindMSS: case layers.TCPOptionKindMSS:
if len(opt.OptionData) >= 2 { if len(opt.OptionData) >= 2 {
meta.MSS = binary.BigEndian.Uint16(opt.OptionData[:2]) meta.MSS = binary.BigEndian.Uint16(opt.OptionData[:2])
@ -358,6 +364,9 @@ func extractTCPMeta(tcp *layers.TCP) api.TCPMeta {
meta.Options = append(meta.Options, "WS") meta.Options = append(meta.Options, "WS")
case layers.TCPOptionKindSACKPermitted: case layers.TCPOptionKindSACKPermitted:
meta.Options = append(meta.Options, "SACK") meta.Options = append(meta.Options, "SACK")
case layers.TCPOptionKindSACK:
// SACK blocks (actual SACK data, not just permitted)
meta.Options = append(meta.Options, "SACK")
case layers.TCPOptionKindTimestamps: case layers.TCPOptionKindTimestamps:
meta.Options = append(meta.Options, "TS") meta.Options = append(meta.Options, "TS")
default: default:

View File

@ -3,7 +3,7 @@
%if %{defined build_version} %if %{defined build_version}
%define spec_version %{build_version} %define spec_version %{build_version}
%else %else
%define spec_version 1.0.4 %define spec_version 1.0.5
%endif %endif
Name: ja4sentinel Name: ja4sentinel