* [PATCH] netfilter: fix: support ipv6header match on packets ending with NEXTHDR_NONE
@ 2009-04-28 17:05 Christoph Paasch
2009-05-05 13:33 ` Patrick McHardy
0 siblings, 1 reply; 2+ messages in thread
From: Christoph Paasch @ 2009-04-28 17:05 UTC (permalink / raw)
To: netfilter-devel; +Cc: Christoph Paasch
As packets ending with NEXTHDR_NONE don't have a last extension header,
the check for the length needs to be after the check for NEXTHDR_NONE.
Signed-off-by: Christoph Paasch <christoph.paasch@gmail.com>
---
| 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
--git a/net/ipv6/netfilter/ip6t_ipv6header.c b/net/ipv6/netfilter/ip6t_ipv6header.c
index 14e6724..91490ad 100644
--- a/net/ipv6/netfilter/ip6t_ipv6header.c
+++ b/net/ipv6/netfilter/ip6t_ipv6header.c
@@ -50,14 +50,14 @@ ipv6header_mt6(const struct sk_buff *skb, const struct xt_match_param *par)
struct ipv6_opt_hdr _hdr;
int hdrlen;
- /* Is there enough space for the next ext header? */
- if (len < (int)sizeof(struct ipv6_opt_hdr))
- return false;
/* No more exthdr -> evaluate */
if (nexthdr == NEXTHDR_NONE) {
temp |= MASK_NONE;
break;
}
+ /* Is there enough space for the next ext header? */
+ if (len < (int)sizeof(struct ipv6_opt_hdr))
+ return false;
/* ESP -> evaluate */
if (nexthdr == NEXTHDR_ESP) {
temp |= MASK_ESP;
--
1.6.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] netfilter: fix: support ipv6header match on packets ending with NEXTHDR_NONE
2009-04-28 17:05 [PATCH] netfilter: fix: support ipv6header match on packets ending with NEXTHDR_NONE Christoph Paasch
@ 2009-05-05 13:33 ` Patrick McHardy
0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2009-05-05 13:33 UTC (permalink / raw)
To: Christoph Paasch; +Cc: netfilter-devel
Christoph Paasch wrote:
> As packets ending with NEXTHDR_NONE don't have a last extension header,
> the check for the length needs to be after the check for NEXTHDR_NONE.
Applied, thanks Christoph.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-05 13:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-28 17:05 [PATCH] netfilter: fix: support ipv6header match on packets ending with NEXTHDR_NONE Christoph Paasch
2009-05-05 13:33 ` Patrick McHardy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).