netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: holger@eitzenberger.org
To: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Cc: netfilter-devel@vger.kernel.org, netdev@vger.kernel.org
Subject: [patch 2/4] ipset: make IPv4 and IPv6 address handling similar
Date: Tue, 18 Jan 2011 15:21:56 +0100	[thread overview]
Message-ID: <20110118142247.498399684@eitzenberger.org> (raw)
In-Reply-To: 20110118142154.697547841@eitzenberger.org

[-- Attachment #1: ipset-fix-ipv6-netmask-parsing.diff --]
[-- Type: text/plain, Size: 760 bytes --]

While the following works for AF_INET:

 ipset add foo 192.168.1.1/32

this does not work for AF_INET6:

 ipset add foo6 20a1:1:2:3:4:5:6:7/128
 ipset v5.2: Syntax error: plain IP address must be supplied: 20a1:1:2:3:4:5:6:7/128
 
Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>

Index: ipset/lib/parse.c
===================================================================
--- ipset.orig/lib/parse.c	2011-01-14 11:14:41.000000000 +0100
+++ ipset/lib/parse.c	2011-01-14 11:15:06.000000000 +0100
@@ -960,9 +960,7 @@
 		ipset_data_set(data, IPSET_OPT_FAMILY, &family);
 	}
 	
-	return family == AF_INET ? ipset_parse_ip(session, opt, str)
-				 : ipset_parse_single_ip(session, opt, str);
-
+	return ipset_parse_ip(session, opt, str);
 }
 
 /**

-- 

  parent reply	other threads:[~2011-01-18 14:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-18 14:21 [patch 0/4] Ipset fixes holger
2011-01-18 14:21 ` [patch 1/4] ipset: show correct line numbers in restore output holger
2011-01-18 20:15   ` Jozsef Kadlecsik
2011-01-18 14:21 ` holger [this message]
2011-01-18 20:18   ` [patch 2/4] ipset: make IPv4 and IPv6 address handling similar Jozsef Kadlecsik
2011-01-18 20:25     ` Jan Engelhardt
2011-01-18 20:37       ` Jozsef Kadlecsik
2011-01-18 20:39         ` Jan Engelhardt
2011-01-18 20:54           ` Jozsef Kadlecsik
2011-01-18 21:43           ` Holger Eitzenberger
2011-01-18 22:49             ` Mr Dash Four
2011-01-18 14:21 ` [patch 3/4] ipset: do session initialization once holger
2011-01-18 20:16   ` Jozsef Kadlecsik
2011-01-18 14:21 ` [patch 4/4] ipset: fix build with NDEBUG defined holger
2011-01-18 20:20   ` Jozsef Kadlecsik

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=20110118142247.498399684@eitzenberger.org \
    --to=holger@eitzenberger.org \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@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;
as well as URLs for NNTP newsgroup(s).