Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ldpd: fix wrong gtsm count #16226

Merged
merged 1 commit into from
Jul 2, 2024
Merged

ldpd: fix wrong gtsm count #16226

merged 1 commit into from
Jul 2, 2024

Conversation

anlancs
Copy link
Contributor

@anlancs anlancs commented Jun 15, 2024

In linux networking stack, the received mpls packets will be processed by the host twice, one as mpls packet, the other as ip packet, so its ttl decreased 1.

So, we need release the IP_MINTTL value if gtsm is enabled, it is for the mpls packets of neighbor session caused by the command: label local advertise explicit-null.

This change makes the gtsm mechanism a bit deviation.

Fix #8313

Copy link
Member

@rwestphal rwestphal left a comment

Choose a reason for hiding this comment

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

In linux networking stack, the received mpls packets will be processed by the host twice, one as mpls packet, the other as ip packet, so its ttl decreased 1.

@anlancs Thanks for troubleshoothing this. As we discussed on Slack, this behavior is reproducible on kernel 5.10 but not on 6.1. It's a kernel bug that was fixed along the way.

That said, we definitely need this workaround on FRR's side. I think it'd be good however to add a comment explaining why this TTL decrement is necessary, for future reference.

@anlancs
Copy link
Contributor Author

anlancs commented Jun 15, 2024

reproducible on new kernel 5.10 and 6.1 ( there maybe no this issue in older versions ), and this PR should work with all version if older kernel version is involved.
It only makes the gtsm mechanism a bit deviation.
@rwestphal Added comment for it, and re-pushed it.

In linux networking stack, the received mpls packets will be processed
by the host *twice*, one as mpls packet, the other as ip packet, so
its ttl decreased 1.

So, we need release the `IP_MINTTL` value if gtsm is enabled, it is for the
mpls packets of neighbor session caused by the command:
`label local advertise explicit-null`.

This change makes the gtsm mechanism a bit deviation.

Fix PR FRRouting#8313

Signed-off-by: anlan_cs <[email protected]>
@anlancs anlancs requested a review from rwestphal June 15, 2024 21:48
@ton31337
Copy link
Member

@Mergifyio backport dev/10.1 stable/10.0 stable/9.1 stable/9.0

Copy link

mergify bot commented Jun 17, 2024

backport dev/10.1 stable/10.0 stable/9.1 stable/9.0

✅ Backports have been created

@ton31337
Copy link
Member

@frrbot rereview

@riw777 riw777 self-requested a review June 25, 2024 15:42
Copy link
Member

@riw777 riw777 left a comment

Choose a reason for hiding this comment

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

looks good

@riw777 riw777 merged commit a32ec59 into FRRouting:master Jul 2, 2024
11 checks passed
ton31337 added a commit that referenced this pull request Jul 3, 2024
donaldsharp added a commit that referenced this pull request Jul 3, 2024
donaldsharp added a commit that referenced this pull request Jul 3, 2024
donaldsharp added a commit that referenced this pull request Jul 3, 2024
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.

Unstable tcp ldp session when using explicit-null
4 participants