10 Star 1 Fork 32

src-openEuler/iptables
Closed

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
backport-ip6tables-Fix-checking-existence-of-rule.patch 1.21 KB
Copy Edit Raw Blame History
yangl777 authored 2025-04-25 16:29 +08:00 . ip6tables:Fix checking existence of rule
From 78850e7dba64a949c440dbdbe557f59409c6db48 Mon Sep 17 00:00:00 2001
From: Markus Boehme <markubo@amazon.com>
Date: Mon, 3 Apr 2023 23:13:47 +0200
Subject: ip6tables: Fix checking existence of rule
Pass the proper entry size when creating a match mask for checking the
existence of a rule. Failing to do so causes wrong results.
Reported-by: Jonathan Caicedo <jonathan@jcaicedo.com>
Fixes: eb2546a846776 ("xshared: Share make_delete_mask() between ip{,6}tables")
Signed-off-by: Markus Boehme <markubo@amazon.com>
Signed-off-by: Phil Sutter <phil@nwl.cc>
Conflict:Adapt context
Reference:https://git.netfilter.org/iptables/commit/?id=78850e7dba64a949c440dbdbe557f59409c6db48
---
iptables/ip6tables.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/iptables/ip6tables.c b/iptables/ip6tables.c
index 7038689..5c10679 100644
--- a/iptables/ip6tables.c
+++ b/iptables/ip6tables.c
@@ -352,7 +352,7 @@ check_entry(const xt_chainlabel chain, struct ip6t_entry *fw,
return 0;
}
- mask = make_delete_mask(matches, target, sizeof(fw));
+ mask = make_delete_mask(matches, target, sizeof(*fw));
for (i = 0; i < nsaddrs; i++) {
fw->ipv6.src = saddrs[i];
fw->ipv6.smsk = smasks[i];
--
2.43.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/iptables.git
git@gitee.com:src-openeuler/iptables.git
src-openeuler
iptables
iptables
master

Search