Switch to table_id function of netlink_packet_route

This commit is contained in:
Rayhaan Jaufeerally
2024-07-16 19:03:02 +00:00
parent a7b17e99c0
commit 7a99fda7a5

View File

@ -58,7 +58,7 @@ impl SouthboundInterface for NetlinkConnector {
.destination_prefix(addr, prefix_len)
.gateway(gw_addr);
if let Some(table_id) = self.table {
mutation = mutation.table(table_id.try_into().unwrap());
mutation = mutation.table_id(table_id.try_into().unwrap());
}
mutation.execute().await.map_err(|e| eyre::Error::from(e))
}
@ -88,7 +88,7 @@ impl SouthboundInterface for NetlinkConnector {
.destination_prefix(addr, prefix_len)
.gateway(gw_addr);
if let Some(table_id) = self.table {
mutation = mutation.table(table_id.try_into().unwrap());
mutation = mutation.table_id(table_id.try_into().unwrap());
}
mutation.execute().await.map_err(|e| eyre::Error::from(e))
}