Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Roman Hoog Antink <rha@open.ch>
To: netfilter@vger.kernel.org
Subject: conntrackd: fix IPv6 address pattern
Date: Tue, 19 Mar 2013 15:36:18 +0100	[thread overview]
Message-ID: <514877E2.9050105@open.ch> (raw)

[-- Attachment #1: Type: text/plain, Size: 116 bytes --]

Hi

Please consider accepting the following patch that fixes an IPv6 address
pattern in the lexical parser.

-Roman

[-- Attachment #2: ipv6-conntrackd.patch --]
[-- Type: text/x-patch, Size: 1170 bytes --]

commit 747bb23944cca2e6927f05f60fc6fba70e187ca0
Author: James Guthrie <jag@open.ch>
Date:   Tue Mar 19 15:12:35 2013 +0100

    conntrackd: fix IPv6 address pattern
    
    The conntrackd configuration allows for IPv6 addresses to be specified that
    should be ignored (connections for which should not be synchronised). The
    Conntrackd config accepts two forms of IPv6 address:
    1: fe80::1
    2: fe80:0:0:0:0:0:0:1
    
    This patch fixes the lexical parser for form 2.
    
    Signed-off-by: Roman Hoog Antink <rha@open.ch>

diff --git a/src/read_config_lex.l b/src/read_config_lex.l
index bec2d81..b4d11d4 100644
--- a/src/read_config_lex.l
+++ b/src/read_config_lex.l
@@ -44,8 +44,8 @@ ip4		{ip4_part}\.{ip4_part}\.{ip4_part}\.{ip4_part}{ip4_cidr}?
 hex_255		[0-9a-fA-F]{1,4}
 ip6_cidr	\/[0-1]*[0-9]*[0-9]+
 ip6_part	{hex_255}":"?
-ip6_form1	{ip6_part}{0,16}"::"{ip6_part}{0,16}
-ip6_form2	({hex_255}":"){16}{hex_255}
+ip6_form1	{ip6_part}{0,7}"::"{ip6_part}{0,7}
+ip6_form2	({hex_255}":"){0,7}{hex_255}
 ip6		{ip6_form1}{ip6_cidr}?|{ip6_form2}{ip6_cidr}?
 string		[a-zA-Z][a-zA-Z0-9\.\-]*
 persistent	[P|p][E|e][R|r][S|s][I|i][S|s][T|t][E|e][N|n][T|T]

             reply	other threads:[~2013-03-19 14:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-19 14:36 Roman Hoog Antink [this message]
2013-03-20 14:53 ` conntrackd: fix IPv6 address pattern Pablo Neira Ayuso

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=514877E2.9050105@open.ch \
    --to=rha@open.ch \
    --cc=netfilter@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox