All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] reorder delimiters in xdigit2bin
@ 2007-01-16  9:13 Jerome Borsboom
  0 siblings, 0 replies; only message in thread
From: Jerome Borsboom @ 2007-01-16  9:13 UTC (permalink / raw)
  To: netfilter-devel

The nf_conntrack SIP helper does not catch ip-address cases like 
192.168.1.1:5060 due to the ':' not being catched by the recently 
introduced wildcard delimiters in in[46]_pton. Reordering the xdigit2bin 
function solves this.

Signed-off-by: Jerome Borsboom <j.borsboom@erasmusmc.nl>

--- linux-2.6.20-rc5/net/core/utils.c	2007-01-16 09:57:05.000000000 +0100
+++ linux-2.6.20-rc5.new/net/core/utils.c	2007-01-16 09:59:49.000000000 +0100
@@ -103,8 +103,6 @@
  {
  	if (c == delim || c == '\0')
  		return IN6PTON_DELIM;
-	if (c == ':')
-		return IN6PTON_COLON_MASK;
  	if (c == '.')
  		return IN6PTON_DOT;
  	if (c >= '0' && c <= '9')
@@ -115,6 +113,8 @@
  		return (IN6PTON_XDIGIT | (c - 'A' + 10));
  	if (delim == -1)
  		return IN6PTON_DELIM;
+	if (c == ':')
+		return IN6PTON_COLON_MASK;
  	return IN6PTON_UNKNOWN;
  }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-01-16  9:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-16  9:13 [PATCH] reorder delimiters in xdigit2bin Jerome Borsboom

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.