Skip to content

Conversation

@shivkr6
Copy link
Contributor

@shivkr6 shivkr6 commented Oct 30, 2025

DEPENDS ON: #12

Adds support for conntrack entry deletion (IPCTNL_MSG_CT_DELETE).

Implemented the ConntrackMessage::Delete variant and the following ConntrackNla attributes required to specify a entry:

  • CtaTupleReply
  • CtaStatus
  • CtaTimeout
  • CtaMark

Serialization and deserialization are verified against conntrack -D packet captures for TCP/IPv4 and UDP/IPv6.

bitflags bumped to v2.10.0

Implemented the following attributes required to successfully construct a conntrack get request:
* iptuple
* protoinfo
* protoinfotcp
* prototuple
* tcp_flags
* tuple

Signed-off-by: Shivang K Raghuvanshi <shivangraghuvanshi2005@gmail.com>
This refactors the crate to use type-safe enums for netfilter subsystems and message types, for a safer and more idiomatic API.

- Introduces a `Subsystem` enum to replace raw `u8` identifiers for `NfLog` and `Conntrack` subsystems.

- Introduces `NfLogMessageType` and `ConntrackMessageType` enums to provide type safety for messages within each subsystem.

- Makes the top-level `NetfilterMessage::message_type()` function private to guide users towards the safer pattern of matching on `NetfilterMessageInner`.

- Updates the internal parsing logic in `buffer.rs` to use the new `Subsystem` enum.

Signed-off-by: Shivang K Raghuvanshi <shivangraghuvanshi2005@gmail.com>
Implemented the `Delete`/`IPCTNL_MSG_CT_DELETE` conntrack message type and the following attributes, which are required to describe a conntrack entry for deletion:

* mark
* status
* timeout
* tuple_reply

Added tests for deleting TCP/IPv4 and UDP/IPv6 conntrack entries.

The bitflags dependency was also bumped to v2.10.0.

Signed-off-by: Shivang K Raghuvanshi <shivangraghuvanshi2005@gmail.com>
@shivkr6 shivkr6 force-pushed the conntrack-delete-new branch from 259b5a6 to 20a7e3f Compare October 30, 2025 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant