aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rule_methods.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rule_methods.rs b/src/rule_methods.rs
index eaf963d..3ebd33e 100644
--- a/src/rule_methods.rs
+++ b/src/rule_methods.rs
@@ -131,7 +131,11 @@ impl Rule {
/// Matches 6in4 packets.
pub fn ip6in4(mut self) -> Self {
self.add_expr(Meta::new(MetaType::NfProto));
- self.add_expr(Cmp::new(CmpOp::Eq, [41]));
+ self.add_expr(Cmp::new(CmpOp::Eq, [libc::NFPROTO_IPV4 as u8]));
+ self.add_expr(
+ HighLevelPayload::Network(NetworkHeaderField::IPv4(IPv4HeaderField::Protocol)).build(),
+ );
+ self.add_expr(Cmp::new(CmpOp::Eq, [41 as u8]));
self
}
/// Matches packets from source `port` and `protocol`.