johnyburd / net-route

Rust crate providing a cross platform interface for interacting with the routing table
https://docs.rs/net-route/
21 stars 14 forks source link

Collect route metric on Linux #20

Closed harryjph closed 8 months ago

johnyburd commented 8 months ago

Thanks for the PR!

If you wouldn't mind, please add the metric to the new route rtnetlink message in linux::add when the metric is Some on the incoming Route reference.

Likewise, when metric is set on the Route passed into linux::delete, the function should only delete a route if the metric matches.

harryjph commented 8 months ago

Thanks! I've rebased onto main and made the requested changes.

johnyburd commented 8 months ago

Cool, thanks