[iptables] iprange: kernel flags were not set
Patrick McHardy
netfilter-cvslog-bounces at lists.netfilter.org
Fri Jun 13 18:12:32 CEST 2008
Gitweb: http://git.netfilter.org/cgi-bin/gitweb.cgi?p=iptables.git;a=commit;h=6a0cd58f7e444137eb757695f917e46eb14201c8
commit 6a0cd58f7e444137eb757695f917e46eb14201c8
Author: Jan Engelhardt <jengelh at medozas.de>
AuthorDate: Fri Jun 13 17:59:29 2008 +0200
Commit: Patrick McHardy <kaber at trash.net>
CommitDate: Fri Jun 13 17:59:29 2008 +0200
iprange: kernel flags were not set
The --src-range and --dst-range parameters did not set the IPRANGE_*
flags in struct xt_iprange_mtinfo.
Reported-by: Maxim Britov <maxim.britov at gmail.com>
Signed-off-by: Jan Engelhardt <jengelh at medozas.de>
Signed-off-by: Patrick McHardy <kaber at trash.net>
via 6a0cd58f7e444137eb757695f917e46eb14201c8 (commit)
from 1564189568fb63292c7f586563d4fda430a40de3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 6a0cd58f7e444137eb757695f917e46eb14201c8
Author: Jan Engelhardt <jengelh at medozas.de>
Date: Fri Jun 13 17:59:29 2008 +0200
iprange: kernel flags were not set
The --src-range and --dst-range parameters did not set the IPRANGE_*
flags in struct xt_iprange_mtinfo.
Reported-by: Maxim Britov <maxim.britov at gmail.com>
Signed-off-by: Jan Engelhardt <jengelh at medozas.de>
Signed-off-by: Patrick McHardy <kaber at trash.net>
-----------------------------------------------------------------------
extensions/libxt_iprange.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
The --src-range and --dst-range parameters did not set the IPRANGE_*
flags in struct xt_iprange_mtinfo.
Reported-by: Maxim Britov <maxim.britov at gmail.com>
Signed-off-by: Jan Engelhardt <jengelh at medozas.de>
Signed-off-by: Patrick McHardy <kaber at trash.net>
diff --git a/extensions/libxt_iprange.c b/extensions/libxt_iprange.c
index 70fcc57..8c8521e 100644
--- a/extensions/libxt_iprange.c
+++ b/extensions/libxt_iprange.c
@@ -119,6 +119,9 @@ iprange_mt4_parse(int c, char **argv, int invert, unsigned int *flags,
if (ia == NULL)
param_act(P_BAD_VALUE, "iprange", "--src-ip", end + 1);
memcpy(&info->src_max.in, ia, sizeof(*ia));
+ info->flags |= IPRANGE_SRC;
+ if (invert)
+ info->flags |= IPRANGE_SRC_INV;
*flags |= F_SRCIP;
return true;
@@ -135,6 +138,9 @@ iprange_mt4_parse(int c, char **argv, int invert, unsigned int *flags,
if (ia == NULL)
param_act(P_BAD_VALUE, "iprange", "--dst-ip", end + 1);
memcpy(&info->dst_max.in, ia, sizeof(*ia));
+ info->flags |= IPRANGE_DST;
+ if (invert)
+ info->flags |= IPRANGE_DST_INV;
*flags |= F_DSTIP;
return true;
}
More information about the netfilter-cvslog
mailing list