-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: handle SCMP errors on UDP socket and add raw socket #125
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mlegner
commented
Jan 24, 2024
|
jpcsmith
approved these changes
Jan 24, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Markus, thank's for preparing this, the raw socket. It looks good. My primary concern would be that we could probably add something (trait or enum) that is a ScionPacket
and can be used in the send function signature.
mlegner
force-pushed
the
feat/scmp-socket
branch
from
January 25, 2024 11:18
4e9eb4e
to
e30d442
Compare
mlegner
force-pushed
the
feat/scmp-socket
branch
2 times, most recently
from
January 25, 2024 12:47
c701bd1
to
f8091bd
Compare
jpcsmith
approved these changes
Jan 25, 2024
mlegner
force-pushed
the
feat/scmp-socket
branch
from
January 26, 2024 08:57
f8091bd
to
8dfdbef
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Originally, I wanted to use the new raw socket as a basis for the UDP socket. However, there are several challenges and the amount of duplicated code turned out to be somewhat limited. So I now kept two separate sockets with some extracted utility functions.
The UDP socket now returns specific errors if SCMP error messages are received. The raw socket can be used to send and receive SCMP info messages (among other custom SCION packets) as shown in the corresponding integration test.
What is still missing (but should be done in a separate PR) is to make some use of the SCMP errors in the
PathAwareDatagram
; for example, to invalidate cached paths.Closes #54