* [PATCH 2.4]: ip6t_{hbh,dst}: Rejects not-strict mode on rule insersion
[not found] <20080908.151349.84890575.kozakai@isl.rdc.toshiba.co.jp>
@ 2008-09-08 6:32 ` Yasuyuki KOZAKAI
[not found] ` <200809080632.m886WYlb010223@toshiba.co.jp>
1 sibling, 0 replies; 2+ messages in thread
From: Yasuyuki KOZAKAI @ 2008-09-08 6:32 UTC (permalink / raw)
To: kaber; +Cc: netfilter-devel
This is for 2.4 kernel (build test with 2.4.37-rc1, I have no environment
to run 2.4, sorry).
[NETFILTER]: ip6t_{hbh,dst}: Rejects not-strict mode on rule insertion
The current code ignores rules for internal options in HBH/DST options
header in packet processing if 'Not strict' mode is specified (which is not
implemented). Clearly it is not expected by user.
Kernel should reject HBH/DST rule insertion with 'Not strict' mode
in the first place.
Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
---
net/ipv6/netfilter/ip6t_dst.c | 6 ++++--
net/ipv6/netfilter/ip6t_hbh.c | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/net/ipv6/netfilter/ip6t_dst.c b/net/ipv6/netfilter/ip6t_dst.c
index 65213e9..35ba724 100644
--- a/net/ipv6/netfilter/ip6t_dst.c
+++ b/net/ipv6/netfilter/ip6t_dst.c
@@ -172,8 +172,6 @@ match(const struct sk_buff *skb,
hdrlen -= 2;
if ( !(optinfo->flags & IP6T_OPTS_OPTS) ){
return ret;
- } else if (optinfo->flags & IP6T_OPTS_NSTRICT) {
- DEBUGP("Not strict - not implemented");
} else {
DEBUGP("Strict ");
DEBUGP("#%d ",optinfo->optsnr);
@@ -253,6 +251,10 @@ checkentry(const char *tablename,
optsinfo->invflags);
return 0;
}
+ if (optsinfo->flags & IP6T_OPTS_NSTRICT) {
+ DEBUGP("ip6t_opts: Not strict - not implemented");
+ return 0;
+ }
return 1;
}
diff --git a/net/ipv6/netfilter/ip6t_hbh.c b/net/ipv6/netfilter/ip6t_hbh.c
index b37e4ce..720cb8d 100644
--- a/net/ipv6/netfilter/ip6t_hbh.c
+++ b/net/ipv6/netfilter/ip6t_hbh.c
@@ -172,8 +172,6 @@ match(const struct sk_buff *skb,
hdrlen -= 2;
if ( !(optinfo->flags & IP6T_OPTS_OPTS) ){
return ret;
- } else if (optinfo->flags & IP6T_OPTS_NSTRICT) {
- DEBUGP("Not strict - not implemented");
} else {
DEBUGP("Strict ");
DEBUGP("#%d ",optinfo->optsnr);
@@ -253,6 +251,10 @@ checkentry(const char *tablename,
optsinfo->invflags);
return 0;
}
+ if (optsinfo->flags & IP6T_OPTS_NSTRICT) {
+ DEBUGP("ip6t_opts: Not strict - not implemented");
+ return 0;
+ }
return 1;
}
--
1.5.3.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 2.4]: ip6t_{hbh,dst}: Rejects not-strict mode on rule insersion
[not found] ` <200809080632.m886WYlb010223@toshiba.co.jp>
@ 2008-09-24 15:30 ` Patrick McHardy
0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2008-09-24 15:30 UTC (permalink / raw)
To: Yasuyuki KOZAKAI; +Cc: netfilter-devel
Yasuyuki KOZAKAI wrote:
> This is for 2.4 kernel (build test with 2.4.37-rc1, I have no environment
> to run 2.4, sorry).
Me neither, I'll forward it to Willy once the 2.6 version is upstream.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-09-24 15:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20080908.151349.84890575.kozakai@isl.rdc.toshiba.co.jp>
2008-09-08 6:32 ` [PATCH 2.4]: ip6t_{hbh,dst}: Rejects not-strict mode on rule insersion Yasuyuki KOZAKAI
[not found] ` <200809080632.m886WYlb010223@toshiba.co.jp>
2008-09-24 15:30 ` Patrick McHardy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox