Skip to content

New mark and mask#296

Merged
itdoginfo merged 1 commit intomainfrom
firewall-new-mark
Jan 22, 2026
Merged

New mark and mask#296
itdoginfo merged 1 commit intomainfrom
firewall-new-mark

Conversation

@itdoginfo
Copy link
Owner

Описание изменений

Новая маркиврока чтоб не было конфликтов

@itdoginfo itdoginfo marked this pull request as ready for review January 22, 2026 09:08
Copilot AI review requested due to automatic review settings January 22, 2026 09:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a critical bug in packet marking by introducing non-overlapping mark values and a proper mask. The old mark values (0x80000 and 0x90000) had overlapping bits that could cause conflicts in packet routing decisions. The new values (0x00010000 and 0x00020000) are mutually exclusive with a proper mask (0x00030000) for bitwise operations.

Changes:

  • Updated mark constants to non-overlapping values
  • Introduced NFT_MARK_MASK for proper bitwise operations
  • Updated all ip rule and nftables commands to use the new mask

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
podkop/files/usr/lib/constants.sh Updated NFT_FAKEIP_MARK and NFT_OUTBOUND_MARK to non-overlapping values, added NFT_MARK_MASK
podkop/files/usr/bin/podkop Updated ip rule and nftables commands to use new NFT_MARK_MASK for consistent packet marking logic

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@itdoginfo itdoginfo reopened this Jan 22, 2026
@itdoginfo itdoginfo merged commit c30160d into main Jan 22, 2026
3 checks passed
@itdoginfo itdoginfo deleted the firewall-new-mark branch January 22, 2026 10:03
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.

2 participants