Skip to content

Two LEN in one record #2

Description

@hms5232
Apr  7 05:58:44 7C56 kernel: [935899.039399] [UFW BLOCK] IN=enp42s0 OUT= MAC= SRC=192.168.1.147 DST=230.230.230.230 LEN=160 TOS=0x00 PREC=0x00 TTL=1 ID=46101 DF PROTO=UDP SPT=37665 DPT=8976 LEN=140

The AI says:

The two LEN fields in the UFW (Uncomplicated Firewall) log entry are referring to different things.

The first LEN=160 refers to the total length of the IP packet, including the IP header and the UDP payload.

The second LEN=140 refers to the length of the UDP payload only, excluding the IP header.

In other words, the total packet length is 160 bytes, and the UDP payload inside that packet is 140 bytes long. The remaining 20 bytes are likely the IP header, which contains information such as source and destination IP addresses, packet length, and other metadata.

Here's a rough breakdown of the packet structure:

+---------------+---------------+
| IP Header    | UDP Payload  |
|  (20 bytes)  |  (140 bytes) |
+---------------+---------------+
| Total Packet |  (160 bytes) |
+---------------+

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions