Skip to content

fix LPM extraction for composite keys - #272

Open
nicolaskagami wants to merge 1 commit into
mainfrom
nsk/fix-lpm-extraction
Open

fix LPM extraction for composite keys#272
nicolaskagami wants to merge 1 commit into
mainfrom
nsk/fix-lpm-extraction

Conversation

@nicolaskagami

@nicolaskagami nicolaskagami commented Aug 21, 2026

Copy link
Copy Markdown
  • LPM extraction now checks the size of the type instead of the size of the key, which was only correct if the key wasn't composite.
  • It now correctly considers the "length" byte when advancing the offset.
  • A test was added to exercise those two scenarios with a composite (lpm, exact) key.

@rcgoodfellow rcgoodfellow left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Mostly LGTM. Has this been tested in voxel, a4x2 or omicron-local?

Comment thread test/src/vrf_router.rs
0,
);

// vrf b (port 0): 10.1.0.0/16 -> port 3

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

should be (port 1)?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants