rust-netlink / rtnetlink

Other
85 stars 48 forks source link

ip append (ignore dup / os error 22 file exists) #26

Open journaux opened 1 year ago

journaux commented 1 year ago

rtnetlink does not have documentation on supporting ip route append ... cmdlet, which enables two default routes specified for any table (without using a metric) - hoping there might be a missing flag / feature for this lib that enables the same capability

cathay4t commented 7 months ago

I guess RouteAddRequest::message_mut().header.flags |= NLM_F_APPEND should works.

cathay4t commented 7 months ago

My bad. Above line will not work. This flag is for NetlinkMessage, not RouteNetlinkMesage

cathay4t commented 7 months ago

@journaux Can you try https://github.com/rust-netlink/rtnetlink/pull/52 ?