Add API for Seg6 Encapsulation#159
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces SRv6 (Segment Routing over IPv6) support by adding an output_seg6 method to the RouteMessageBuilder and providing a new example script, add_route_seg6.rs. The review feedback focuses on improving the example's robustness and idiomaticity, specifically by refining error handling with non-zero exit codes, replacing unwrap() calls, and adjusting the gateway parsing logic to use Ipv6Addr. Additionally, suggestions were made to clean up imports and formatting within both the builder and the example files.
|
Applied recommended changes |
|
Could you please squash the commits? In addition please address the rustfmt/clippy warning. There is one warning not related to the code you are touching. Address it on a separated commit please. |
Following rust-netlink/netlink-packet-route#227, we can now create Seg6Header outside of the netlink-packet-route crate. This commit adds a new `output_seg6` function to RouteMessageBuilder, allowing to easily create new routes with SRv6 encapsulation. An example of route creation is present in `examples/`. Signed-off-by: Aperence <anthony.doeraene@hotmail.com>
|
I squashed the two commits and created a new commit for the fix of the clippy warning in traffic_control/test.rs. Normally all warnings should have been corrected. |
Following rust-netlink/netlink-packet-route#227, we can now create Seg6Header outside of the netlink-packet-route crate. This commit adds a new
output_seg6function to RouteMessageBuilder, allowing to easily create new routes with SRv6 encapsulation.An example of route creation is present in
examples/.