diff options
-rw-r--r-- | src/rule_methods.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rule_methods.rs b/src/rule_methods.rs index 96df04f..ded8594 100644 --- a/src/rule_methods.rs +++ b/src/rule_methods.rs @@ -110,11 +110,16 @@ impl Rule { impl Rule { /// Matches ICMP packets. pub fn icmp(mut self) -> Self { - // quid of icmpv6? self.add_expr(Meta::new(MetaType::L4Proto)); self.add_expr(Cmp::new(CmpOp::Eq, [libc::IPPROTO_ICMP as u8])); self } + /// Matches ICMPv6 packets. + pub fn icmpv6(mut self) -> Self { + self.add_expr(Meta::new(MetaType::L4Proto)); + self.add_expr(Cmp::new(CmpOp::Eq, [libc::IPPROTO_ICMPV6 as u8])); + self + } /// Matches IGMP packets. pub fn igmp(mut self) -> Self { self.add_expr(Meta::new(MetaType::L4Proto)); |