Skip to content

Commit dabef43

Browse files
richardstephensJohnTitor
authored andcommitted
Rule: function to set fw_mark when adding rule
1 parent 454fc58 commit dabef43

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/rule/add.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ impl<T> RuleAddRequest<T> {
9393
self
9494
}
9595

96+
/// Set the fwmark
97+
pub fn fw_mark(mut self, fw_mark: u32) -> Self {
98+
self.message.nlas.push(Nla::FwMark(fw_mark));
99+
self
100+
}
101+
96102
/// Build an IP v4 rule
97103
pub fn v4(mut self) -> RuleAddRequest<Ipv4Addr> {
98104
self.message.header.family = AF_INET as u8;

0 commit comments

Comments
 (0)