MystenLabs / scion-rs

This library provides an end-host networking stack for SCION and can be used in Rust applications to communicate over a SCION network.
Apache License 2.0
20 stars 5 forks source link

feat: handle SCMP errors on UDP socket and add raw socket #125

Closed mlegner closed 8 months ago

mlegner commented 8 months ago

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

github-actions[bot] commented 8 months ago

Code Coverage

Package Line Rate Health
crates/scion-proto/src/scmp 77%
crates/scion/src/pan 78%
crates/scion-proto/src 79%
crates/scion-proto/src/packet 80%
crates/scion/src/pan/path_strategy 83%
crates/scion-proto/src/path 83%
crates/scion/src 80%
crates/scion-proto/src/packet/headers 85%
crates/scion-proto/src/path/standard 92%
crates/scion-proto/src/reliable 95%
crates/scion-proto/src/address 70%
crates/scion/src/daemon 91%
crates/scion-proto/src/path/metadata 100%
crates/scion/src/socket 77%
Summary 79% (1929 / 2427)