Skip to contentSkip to conversation

Typo in IPv4 match debug print code

PATCH Applied Thomas Jacob 2 participants 4 messages Jan 26, 2011 – Jan 27, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Typo in IPv4 match debug print code

---
 net/netfilter/xt_iprange.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/netfilter/xt_iprange.c +1 -1
index 73c33a4..5c14308 100644
@@ -31,7 +31,7 @@ iprange_mt4(const struct sk_buff *skb, struct xt_action_param *par)
 			pr_debug("src IP %pI4 NOT in range %s%pI4-%pI4\n",
 			         &iph->saddr,
 			         (info->flags & IPRANGE_SRC_INV) ? "(INV) " : "",
-			         &info->src_max.ip,
+			         &info->src_min.ip,
 			         &info->src_max.ip);
 			return false;
 		}
Signature · 1 line
1.5.6.5
#1 lore raw

PATCH 2/2 Add IPv6 match debug print code

---
 net/netfilter/xt_iprange.c |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)
net/netfilter/xt_iprange.c +14 -2
index 5c14308..cd6e263 100644
@@ -76,15 +76,27 @@ iprange_mt6(const struct sk_buff *skb, struct xt_action_param *par)
 		m  = iprange_ipv6_lt(&iph->saddr, &info->src_min.in6);
 		m |= iprange_ipv6_lt(&info->src_max.in6, &iph->saddr);
 		m ^= !!(info->flags & IPRANGE_SRC_INV);
-		if (m)
+		if (m) {
+			pr_debug("src IP %pI6 NOT in range %s%pI6-%pI6\n",
+			         &iph->saddr,
+			         (info->flags & IPRANGE_SRC_INV) ? "(INV) " : "",
+			         &info->src_min.in6,
+			         &info->src_max.in6);
 			return false;
+		}
 	}
 	if (info->flags & IPRANGE_DST) {
 		m  = iprange_ipv6_lt(&iph->daddr, &info->dst_min.in6);
 		m |= iprange_ipv6_lt(&info->dst_max.in6, &iph->daddr);
 		m ^= !!(info->flags & IPRANGE_DST_INV);
-		if (m)
+		if (m) {
+			pr_debug("dst IP %pI6 NOT in range %s%pI6-%pI6\n",
+			         &iph->daddr,
+			         (info->flags & IPRANGE_DST_INV) ? "(INV) " : "",
+			         &info->dst_min.in6,
+			         &info->dst_max.in6);
 			return false;
+		}
 	}
 	return true;
 }
Signature · 1 line
1.5.6.5
#2 lore raw

Re: [PATCH 2/2] Add IPv6 match debug print code

Am 26.01.2011 18:22, schrieb Thomas Jacob:

Quoted 1 line

This patch does not apply cleanly, please base your patches on

git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6.git