Skip to content

Conversation

@qmonnet
Copy link
Member

@qmonnet qmonnet commented Jan 21, 2026

We recently added support for "default" expose blocks used as a fallback destination for packets from the VPC when the destination IP matches no other exposed prefixes. From the "default" block we deduce information about the destination VPC, and about whether the packet has a valid destination. But we forgot to use it for the reverse check: when a packet is emitted from a VPC, from behind a "default" block, its source address should always be considered as valid. This is not the case! So if we have VPC A and B peered together, and VPC B exposing a "default" block, VPC A can send packets to VPC B through this block, but all replies from VPC B are dropped.

This PR fixes the issue by adding a "default source" connection information object to the context for the flow-filter stage, in the per-source-VPC-discriminant table. This information is used to validate the destination and retrieve the destination VPC when a packet is emitted from behind a "default" expose block.

We'll need to add some processing specific to some of the local expose
objects in a follow-up commit, so we need to make the distinction on a
per-expose basis rather than use a flat map of the prefixes.

Signed-off-by: Quentin Monnet <qmo@qmon.net>
We recently added support for "default" expose blocks used as a fallback
destination for packets from the VPC when the destination IP matches no
other exposed prefixes. From the "default" block we deduce information
about the destination VPC, and about whether the packet has a valid
destination. But we forgot to use it for the reverse check: when a
packet is emitted from a VPC, from behind a "default" block, its source
address should always be considered as valid. This is not the case! So
if we have VPC A and B peered together, and VPC B exposing a "default"
block, VPC A can send packets to VPC B through this block, but all
replies from VPC B are dropped.

This commit fixes the issue by adding a "default source" connection
information object to the context for the flow-filter stage, in the
per-source-VPC-discriminant table. This information is used to validate
the destination and retrieve the destination VPC when a packet is
emitted from behind a "default" expose block.

Also add unit tests to validate the behaviour.

Fixes: d081eb6 ("feat(flow-filter): Add support for "default" destination VpcExpose")
Signed-off-by: Quentin Monnet <qmo@qmon.net>
@qmonnet qmonnet added this to the GW R2 milestone Jan 21, 2026
@qmonnet qmonnet self-assigned this Jan 21, 2026
@qmonnet qmonnet requested a review from a team as a code owner January 21, 2026 20:23
@qmonnet qmonnet added bug Something isn't working ci:-upgrade Disable VLAB upgrade tests labels Jan 21, 2026
@qmonnet qmonnet linked an issue Jan 21, 2026 that may be closed by this pull request
@Fredi-raspall
Copy link
Contributor

@qmonnet I've opened a small PR (#1229) which addresses some other minor things, but not the concern above. Feel free to squash/modify/drop at will.

@Fredi-raspall Fredi-raspall self-requested a review January 22, 2026 11:06
Copy link
Contributor

@Fredi-raspall Fredi-raspall left a comment

Choose a reason for hiding this comment

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

Clarified, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ci:-upgrade Disable VLAB upgrade tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stage flow-filter rejects packets coming from "default" expose

3 participants