All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: johnpol@2ka.mipt.ru
Cc: Harald Welte <laforge@netfilter.org>,
	netfilter-devel@lists.netfilter.org
Subject: Re: [1/2] osf: fixed matching bug.
Date: Sun, 22 Aug 2004 00:12:45 +0200	[thread overview]
Message-ID: <4127C8DD.2080406@trash.net> (raw)
In-Reply-To: <20040822010353.34801a4f@zanzibar.2ka.mipt.ru>

Evgeniy Polyakov wrote:

>Fixed matching bug - when we have match and have options to process
>not only first one but all, then we may rewrite fmatch value
>with FMATCH_WRONG parameters. Later osf will create decision based on
>the latest fmatch value, but not the fact that osf had match before.
>
>Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
>
>	Evgeniy Polyakov ( s0mbre )
>
>Only failure makes us experts. -- Theo de Raadt
>  
>

Applied to 2.4 and 2.6, but hand edited, you don't need to move the lock
for a local variable.

diff -u -r1.1 ipt_osf.c
--- osf/linux-2.6/net/ipv4/netfilter/ipt_osf.c  22 Jul 2004 19:21:58 
-0000      1.1
+++ osf/linux-2.6/net/ipv4/netfilter/ipt_osf.c  21 Aug 2004 22:10:02 -0000
@@ -412,6 +412,9 @@
        }

        read_unlock(&osf_lock);
+
+       if (fcount)
+               fmatch = FMATCH_OK;

        return (fmatch == FMATCH_OK)?1:0;
 }

>------------------------------------------------------------------------
>
>--- netfilter_cvs/patch-o-matic-ng/osf/linux-2.6/net/ipv4/netfilter/ipt_osf.c	2004-07-18 00:10:43.000000000 +0400
>+++ netfilter_cvs/patch-o-matic-ng/osf/linux-2.6/net/ipv4/netfilter/ipt_osf.c	2004-08-20 21:55:22.000000000 +0400
>@@ -411,8 +413,11 @@
> 		}
> 	}
> 
>-	read_unlock(&osf_lock);
>+	if (fcount)
>+		fmatch = FMATCH_OK;
> 
>+	read_unlock(&osf_lock);
>+	
> 	return (fmatch == FMATCH_OK)?1:0;
> }
> 
>  
>

      reply	other threads:[~2004-08-21 22:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-21 21:03 [1/2] osf: fixed matching bug Evgeniy Polyakov
2004-08-21 22:12 ` Patrick McHardy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4127C8DD.2080406@trash.net \
    --to=kaber@trash.net \
    --cc=johnpol@2ka.mipt.ru \
    --cc=laforge@netfilter.org \
    --cc=netfilter-devel@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.