* [PATCH 1/4]: Fix SNAT/DNAT target size checks
@ 2005-01-25 4:48 Patrick McHardy
0 siblings, 0 replies; only message in thread
From: Patrick McHardy @ 2005-01-25 4:48 UTC (permalink / raw)
To: David S. Miller; +Cc: Netfilter Development Mailinglist
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: 01.diff --]
[-- Type: text/x-patch, Size: 1925 bytes --]
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2005/01/25 03:56:48+01:00 gandalf@wlug.westbo.se
# [NETFILTER]: Fix SNAT/DNAT target size checks
#
# This patch fixes two size checks in the checkentry() for SNAT and DNAT
# targets. The patch to remove support for multiple ranges forgot to use
# IPT_ALIGN(). This isn't a problem on x86 but other archs like parisc
# are affected and thus can't add any SNAT/DNAT rules.
#
# Signed-off-by: Martin Josefsson <gandalf@wlug.westbo.se>
# Signed-off-by: Patrick McHardy <kaber@trash.net>
#
# net/ipv4/netfilter/ip_nat_rule.c
# 2005/01/25 03:56:39+01:00 gandalf@wlug.westbo.se +2 -2
# [NETFILTER]: Fix SNAT/DNAT target size checks
#
# This patch fixes two size checks in the checkentry() for SNAT and DNAT
# targets. The patch to remove support for multiple ranges forgot to use
# IPT_ALIGN(). This isn't a problem on x86 but other archs like parisc
# are affected and thus can't add any SNAT/DNAT rules.
#
# Signed-off-by: Martin Josefsson <gandalf@wlug.westbo.se>
# Signed-off-by: Patrick McHardy <kaber@trash.net>
#
diff -Nru a/net/ipv4/netfilter/ip_nat_rule.c b/net/ipv4/netfilter/ip_nat_rule.c
--- a/net/ipv4/netfilter/ip_nat_rule.c 2005-01-25 04:37:00 +01:00
+++ b/net/ipv4/netfilter/ip_nat_rule.c 2005-01-25 04:37:00 +01:00
@@ -181,7 +181,7 @@
return 0;
}
- if (targinfosize != sizeof(struct ip_nat_multi_range_compat)) {
+ if (targinfosize != IPT_ALIGN(sizeof(struct ip_nat_multi_range_compat))) {
DEBUGP("SNAT: Target size %u wrong for %u ranges\n",
targinfosize, mr->rangesize);
return 0;
@@ -214,7 +214,7 @@
return 0;
}
- if (targinfosize != sizeof(struct ip_nat_multi_range_compat)) {
+ if (targinfosize != IPT_ALIGN(sizeof(struct ip_nat_multi_range_compat))) {
DEBUGP("DNAT: Target size %u wrong for %u ranges\n",
targinfosize, mr->rangesize);
return 0;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-01-25 4:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-25 4:48 [PATCH 1/4]: Fix SNAT/DNAT target size checks Patrick McHardy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.