johnyburd / net-route

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

Collect route metric on Linux #20

Closed harryjph closed 7 months ago

johnyburd commented 7 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 7 months ago

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

johnyburd commented 7 months ago

Cool, thanks