Skip to content

Routed VR: accept packets from related and established connections#12986

Merged
sureshanaparti merged 1 commit intoapache:4.20from
weizhouapache:4.20-fix-routed-vr-ssh
Apr 15, 2026
Merged

Routed VR: accept packets from related and established connections#12986
sureshanaparti merged 1 commit intoapache:4.20from
weizhouapache:4.20-fix-routed-vr-ssh

Conversation

@weizhouapache
Copy link
Copy Markdown
Member

@weizhouapache weizhouapache commented Apr 8, 2026

Description

This PR fixes #12962

the change is similar to #10970

Tested with Routed network and Routed VPC with Dynamic routing

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

Copy link
Copy Markdown
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.

Copilot wasn't able to review any files in this pull request.


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

@weizhouapache
Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 16.26%. Comparing base (6f1aa96) to head (605a7e5).
⚠️ Report is 4 commits behind head on 4.20.

Additional details and impacted files
@@             Coverage Diff              @@
##               4.20   #12986      +/-   ##
============================================
- Coverage     16.26%   16.26%   -0.01%     
  Complexity    13434    13434              
============================================
  Files          5665     5665              
  Lines        500530   500530              
  Branches      60787    60787              
============================================
- Hits          81411    81410       -1     
  Misses       410028   410028              
- Partials       9091     9092       +1     
Flag Coverage Δ
uitests 4.15% <ø> (ø)
unittests 17.11% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@blueorangutan
Copy link
Copy Markdown

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17409

@weizhouapache
Copy link
Copy Markdown
Member Author

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

@weizhouapache a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link
Copy Markdown

[SF] Trillian Build Failed (tid-15829)

@sureshanaparti sureshanaparti requested a review from Copilot April 9, 2026 03:33
Copy link
Copy Markdown
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.

Copilot wasn't able to review any files in this pull request.


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

@sureshanaparti
Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

@sureshanaparti a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link
Copy Markdown

[SF] Trillian test result (tid-15831)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 53594 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr12986-t15831-kvm-ol8.zip
Smoke tests completed. 141 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

Copy link
Copy Markdown
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

clgtm

@weizhouapache
Copy link
Copy Markdown
Member Author

weizhouapache commented Apr 15, 2026

@khumps
could you please verify this fix ? so we can get it into 4.22.1.0 release. thanks

Copy link
Copy Markdown
Member

@kiranchavala kiranchavala left a comment

Choose a reason for hiding this comment

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

LGTM

Tested manually on a routed mode isolated network

  1. Created a zone with dynamic routing enabled and an IP subnet pool configured

  2. Created a network offering with routing mode = Dynamic and default egress policy = Deny

  3. Deploy an isolated routed network using that offering
    In the network's IPv4 Routing Firewall, add:
    Ingress rule: TCP port 22 from 0.0.0.0/0
    Egress rule: TCP port 22 to 0.0.0.0/0

  4. Deploy a VM in the network

  5. Able to SSH to the VM from an external host > works

	
Rules on the router 

	chain fw_chain_egress {
		ip saddr 0.0.0.0/0 ip daddr 0.0.0.0/0 tcp dport 22 accept
		counter packets 3 bytes 228 drop
	}

	chain fw_chain_ingress {
		ip saddr 0.0.0.0/0 ip daddr 0.0.0.0/0 tcp dport 22 accept
		counter packets 0 bytes 0 drop
	}


  1. Remove the egress rule from the network

  2. SSH to the VM from an external host > works

	chain fw_chain_egress {
		counter packets 0 bytes 0 drop
	}

	chain fw_chain_ingress {
		ip saddr 0.0.0.0/0 ip daddr 0.0.0.0/0 tcp dport 22 accept
		counter packets 0 bytes 0 drop
	}

@sureshanaparti sureshanaparti merged commit 1fc4cb9 into apache:4.20 Apr 15, 2026
41 of 43 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Apache CloudStack 4.22.1 Apr 15, 2026
@DaanHoogland DaanHoogland deleted the 4.20-fix-routed-vr-ssh branch April 15, 2026 11:34
dhslove added a commit to dhslove/ablestack-cloud that referenced this pull request Apr 21, 2026
Source local main commit:
- 166bb4304f systemvm: allow related and established routed traffic

Source Apache commits:
- 1fc4cb9 Routed VR: accept packets from related and established connections (apache#12986)

Change summary:
- add an nftables ct state established,related accept rule when creating forward chains in CsNetfilter
- leave the existing input/output ICMP allowance behavior unchanged
- record Record 044 sync notes in the history document

Functional impact:
- prevents routed VR forward chains from dropping reply traffic that belongs to already established or related connections
- improves flow continuity for routed guest traffic without widening new-connection exposure

Validation:
- cherry-pick from main applied cleanly on ablestack-europa with no additional manual conflict resolution
- runtime/systemvm test execution has not been run yet in this environment by request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[BUG] fw_chain_egress missing ct state established,related accept causes inbound TCP to fail with default egress deny on routed networks

6 participants