]> git.karo-electronics.de Git - karo-tx-linux.git/commit
[PATCH] NET: parse ip:port strings correctly in in4_pton
authorJerome Borsboom <j.borsboom@erasmusmc.nl>
Thu, 7 Jun 2007 05:40:27 +0000 (22:40 -0700)
committerChris Wright <chrisw@sous-sol.org>
Mon, 11 Jun 2007 18:36:51 +0000 (11:36 -0700)
commit2017554a23ad4fe738cd74f0c8f412153f4bf3fb
treee5ce9f0c7d36c07f60250093a3c4bb8876216877
parent572ea9d51b3c264877522e1e3bc585be24cf5938
[PATCH] NET: parse ip:port strings correctly in in4_pton

in4_pton converts a textual representation of an ip4 address
into an integer representation. However, when the textual representation
is of in the form ip:port, e.g. 192.168.1.1:5060, and 'delim' is set to
-1, the function bails out with an error when reading the colon.

It makes sense to allow the colon as a delimiting character without
explicitly having to set it through the 'delim' variable as there can be
no ambiguity in the point where the ip address is completely parsed. This
function is indeed called from nf_conntrack_sip.c in this way to parse
textual ip:port combinations which fails due to the reason stated above.

Signed-off-by: Jerome Borsboom <j.borsboom@erasmusmc.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/core/utils.c